Fixed output formatting

Output  Headers were wrong. Prints header at top of every sample set,
not just file.