log events to file