Cleans up log to file