Adding console log to event handler