Fixed so that a file will not be searched multiple times.