Paths file processing

again -- better to use a while loop that recursion here.