#2 Add option for obtaining exit code