call flush as well as close when saving tree object (which makes no
difference!)