added prototype of bool_tree_write