better error handling when reading models.xml, improved match of the find method