Added communication failure check