Fix for #4
Fixed the stream closed problem if there were no issues during the check.
Did some cleanup around the XML parser error handler as well.