Implemented changes to set valid exit code
Updated rspec tests
Implemented review comments to log error message
Merge branch 'sid-oc-9390-exit-status' into sprint87-merged