checkign if the device is removed