Missing Comma in CSV File Output

I am writing an output summary file as comma delimited using the following code

open/A resultfileref as "C:\Users\scorpion\Documents\Strain Measurement\strainSummaryResults.txt"
fprintf ResultFileRef, "%s,%g,%g,%s\r\n", Filename,StrainRangeX,StrainRangeY, Secs2Date(DateTime,0)
close resultfileref


The output in the file looks like

Filename,13.5,12.38/12/12

as opposed to

Filename,13.5,12.3,8/12/12

The comma is missing between the third and fourth item. I have stared at the formatting string many a time and the comma is there in the code. Why does it not show up in the file?
I can't reproduce this using Igor Pro 6.30B01 on Macintosh or Windows. I don't think it would be any different in another version because the underlying code, as far as I know, has not changed in years. Here is the test I ran:
Function Test(fileName, StrainRangeX,StrainRangeY)
    String fileName
    Variable StrainRangeX,StrainRangeY
   
    Variable resultfileref
    open/A/P=home resultfileref as "StrainSummaryResults.txt"
    fprintf ResultFileRef, "%s,%g,%g,%s\r\n", Filename,StrainRangeX,StrainRangeY, Secs2Date(DateTime,0)
    close resultfileref
End


I tested it by executing:
Test("Test.txt", 13.5, 12.38)


I then verified the result by opening the file as an Igor notebook.

Perhaps you can come up with a simple example that reproduces the problem.
Found problem.

"Pilot" error I was looking at obsoleted code snippet for the results logging. Looked at right one saw problem.

Thank you for your time.