Adding code to register the callback on startup