Added basic file validation after task completion.