Add check for correct file in task data event

Closes #9, #10

- Add check for same file before resolving the promise