added set_stop_level, get_stack for error tracking when in tree gets too deep