Fixed bug in updating HDF file