metadata to file