add close() and claimdevice()