Update ch5md and close properly HDF5 identifiers (except file).