I commend your suggestions, wrt the testing of the success (or otherwise) of calls, to the house.
in reply to Re: Opens but Won't Write to file
in thread Opens but Won't Write to file
I would, however, debate your suggestion that ...your open call isn't succeeding... since the OP 'sees' a new file on each run - ergo, it strikes me that, as other, for more learned monks, have already pointed out elsewhere on this thread, the OP is suffering from buffering.
A user level that continues to overstate my experience :-))