write meta data into files