add sanity check to texttools