Fix method used to write time to the log file header