Return exit code

Fixes #439
I would just set an exitStatus variable and return {program: program, exitStatu:exitStatus} once at the end