Add mutex again to CsvLog::write() and make the CsvLog use local time.