fix exit code in case 'set -o errexit' is used by caller scripts