Improve error handling during XML processing, use test index name