write metadata into archive