added logging to diagnose error while unregistering