Update write_to_log.c