Fixed a bug in the file_logger. It wasn't exception-safe.