resolved codec problem with saving html to a file for local inspection