Less console output and fix log file writing.