fix malformed XSD and improve XML error messages
handle files during imports, refs #237