close HDF files after reading/writing