Added ccore error catching