added small tweak to catch the {} returned by calling ckit, which was giving an hash to integer conversion error
Reworked the status check and exit logic order and implemented it as a ternary (effectively regressing back to what was there way back when). A better band-aid fix for now.
Merge branch 'feature/exit-code-bugfix' into develop