Added debugging messages for all events and hooks.