added error handling for not loaded xml files