Removed unnecessary test and just check for return code