however for some strange reason (well strange for me) it also write some strange data. i open it through wordpad or notepad in both the data is visible. is there a way of removing this or am i doing something wrong?
Do I see correctly that you are forcing it to write out 200 bytes, even though your string is probably less? I think you need to use a WriteLn function. Otherwise you'll have to specify the actual length of the string up until the newline.