Logging all exceptions to logfile.