If you called `hashtree:close(NewTree)` here, you could avoid the next loop