Implement logging, duplication detection, and device unregistering