Cleaned up logging to file