Corrected logging to output the event name correctly