Added event logging