merge file metadata with metadata from template