added exit codes for the console application when there are failures and errors.