See here for getting sql*plus to return a non-zero exit code on errors (which would cause the Run Oracle Script action to detect and fail the build):
https://www.google.com/search?q=sql*plus+exit+code
The LASTSTEP_OUTPUT system macro should always be updated after each step with the output for that step.