Error-handling if statements substituted by function calls

All the "if( status != CL_SUCCESS )" that returned "N - ERROR!!!" messages
in each part were substituted by function calls to

CheckSuccess(status,N);

for modularization/clarity (questionable).