Added error checks in webcljswrapper