writeMeta method