Try checking the ERRORLEVEL value in reverse sequence. Note that all programs do not issue errorlevels and even Microsoft utilities use them haphazardly. In general a value of zero indicates all is well; anything else is a sign of problems.
program
if errorlevel 1 goto problem
if errorlevel 0 goto AOK
:Problem
.
.
goto end
:AOK
echo Everything OK
goto end
:End