fix duplicate detection on "file" events