Need to catch invalid HTML errors and report properly, instead of barfing. Recommend user to use W3C checker. Need to find a good test file.