Only log to a file if the logfile has been set in the config