update files both of tree and subtree