Added the ability to log all debug messages to a file.