Exit with non-zero code if a script failed.