Program can go through subdirectories, but has trouble when there are a lot