Change return code checker to be more clear