removed log_write