adding simple monitoring function

added an EMAIL_ALERT variable which will trigger an email only if EXIT
from getFinalStatus is not equal to 0.