Implemented a file logger to record errors during runtime. This should
enable users to provide more detailed bug reports.