stat.go: Actually use the index value

It seems I forgot to use the index value so the program will switch to the next file.