Fixed bug in iteration over hdf files