Added CL error checking