Corrected an assert statement
Close h5py File handle and correct noTarget dset