try to write the concerned html file exit with errorcode1