Changed from writing to the console to setting the output to the error so it's a bit more generic.
Cleanup of html file.