Added better event logging