write metadata in dump