implemented RefLog::write()