scan existing files on start up.
fix logging.