Update htmlfile.py

Error trapping fail to close_frame - still get to close session