write/read hdf files working