@marqh This function is doing more than just creating the file, it's writing the header ... perhaps the function name could reflect this?