handled exceptions, added error messages to xml