Added check for pupil files before deleting.