separate filemetadata common functionality