Added verification for returned value in sendCommand function