Removed unnecessary (and danger prone) debug logic and removed redundant exit code. See IMAGE-420, IMAGE-446