dumping events to file