Add debug_write_log()