refactor: abort/continue/undo scripts

@kevgo Set script name and error messages based on the command running instead of having to hardcode it with strings.
You could add the `-r` parameter to declare to make the variable a constant.