better error handling and message in XML deserialization