Proper event generation for pupillator files