write file for events done