error handling: return proper exit code if fails
Merge branch 'release/r4p2'