Update check_subtree.cpp