Catching error sooner and unregister for notification