Make source compilable, refactor exit status
Add error reporting for SGE exit_error, failed, and stuck states