better error message in addstep operation and add explicit process.exit(1) to delete catch statement