add global variable to store ERROR state and exit 1 if tests failed