public void run() {
        progress.setMaximum(estimatedSize);
        progress.start();
        
        while (!isInterrupted() && !stopFlag.get()) {
            try {
                int value = filesOnly ? database.sizeFilesOnly() : database.size();
                if (log.isLoggable(Level.FINEST)) log.finest(TIMESTAMP_FORMAT.format(new Date()) + ": " + value);
                progress.setValue(value);
                Thread.sleep(outputInterval);
            } catch (ExplorationException ex) {
                if (log.isLoggable(Level.SEVERE)) log.severe("Error while outputting database content: " + ex.getMessage());
                ex.printStackTrace();
            } catch (InterruptedException e) {
                break;
            }
        }
        
        if (log.isLoggable(Level.FINE)) log.fine("Exiting ExplorationProgressThread");
        // TODO: We can indicate that something went wrong here
        progress.complete(true);
    }