Catch errors from tree_status

Fixes #341