htmanage.pl add write_file sub