Some logic for handling incorrect filenames on log files.