Fix a file's metadata