Fix the log file writer to actually copy and output the data correctly.