Change stupid way of checking h5 file length