<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_modified(self, event):
 """Handle a file modified event."""

        path = event.src_path
        if path not in self.saw:
            self.saw.add(path)
            self.recompile(path)