Writing header to data logger file in a SD card shield ??

If the file already existed then you will be inserting a new header each time the sketch started. Is that what you intended? If you wanted to only put one header into the file, it's possible to test whether the file previously existed and only write the header if it's a new file.