Store data in HDF5 file instead of pickle