check if file belongs to task before running wach handler