Add assertion to protobuf::OutFile::write