attempt to write binary data into CSV file

 
I am not sure what is wrong with the following. Please advise.

int _file_handle;
string S = "";
.
.
.
.
.
//////////////////////////////////////////////////////////////////////
int wlog(string S)
{
//--update file
_file_handle=FileOpen("mylogfile.csv",FILE_CSV|FILE_WRITE,';');
if (_file_handle<1)
Print("Can not open file error - ",GetLastError());
else
{
FileWriteString(_file_handle, S, 80);
FileClose(_file_handle);
}
//--end of updating file
}
.
.
.
.
S = "test";
wlog(S);

This gives the following error:
attempt to write binary data into CSV file
 
FileWrite(_file_handle,S);
 
FileWriteString is a binary file function.
Use FileWrite for csv files.

(oops, I didn't see Slawa's answer...)
 
Thanks!
Reason: