Added a mode to debug 'events'