It seems to work but it gets a bit messy with the filenames (it prints one over the other, not correctly separated with tabs)...
The numbers seem to print ok though...
That's the code responsible for printing the header line, so that's where I'd look. This will print tab characters in between each file name. What you are seeing might be an artifact of your text editor or the way your are viewing the file.