I am trying to traverse a filesystem tree. When I come across a file with a certain extension I want to open the file and then count the lines in the file. It seems I am get