write metadata to processed directory