Witto,

Thanks to your help, it's working now. Thank you very much.

So was the problem with the first line not being added caused by the wrong placement of the second " $read=ReadLine(3)" in my original script?

Thanks.