Ensure metadataFile is set.