Changes result handling to detect an error in the production.js file. Also fails on presence of error instead of relying on exit code