Added exception handling if Device not connected