cleanup h5nexus tree method