What does Gui mean? Swing, JavaFx, SWT or something else?
Secondly you databaseLog class violates the java naming convention. You should use an uppercase letter up front.
You might want to delegate the whole thing to a SwingWorker (Swing), Task/Service (JavaFx) or something similar for your Framework.
This is because right now you highly depend on the files being on a fast filesystem and that there are not that many files. If that is not the case, maybe because of a network filesystem or simply a very slow/ already busy filesystem, you are stuck with an unresponsive gui.