add error check for SetKernelArg