added error handling
adds html minification