hdf to idx converter + resolved some flush bugs