Corrected final failure countn and exit code