Add check for correct file in task data event

Reported in #9

- Add check for same file before resolving the promise