htmanage.pl add test flag and sub