Checking RET_CHALLENGE_FAILED in main program