check error of kill and return calls