Logging to file now works