better logging of failure conditions in `clean_html` stage