Added the ability to convert to hdf5