Infinite Loop

The while loop that finds the file names is now stuck in an infinite
loop.