I tried this, all you have to do is replace SIZEOF(sDataToWrite) with LEN(sDataToWrite)
SIZEOF is the predefined size of the string variable. LEN is the length of the string till the null character.
It then opens with Notepad in WinCE on the CX8190
If you read back the file in TwinCAT, '\0' is added.