Updated the Send_Command function to check for errors in stderr before reading from stdout