handle UnicodeDecodeError for metadata.xml