Add H5close() statements to clean up pointers.