Add error to run script 2959

Added tests to previous pull request, fixes #2959

Probably needs squash