Better error handling on HTML Parser