Error handling to delHtml