ivar2: Improve command register and unregister
ivar2: improve logging. Fix unregistering