if debug mode, print out tree after every message pass