Changed file iterator to remove bug.