Writing to the device that no longer phsycially exists returns an error.  Rescue the error and determine device is no longer attached.