Fix log file serialization