Add listener for global messenger on unsaved changes