Add write_log