local lnI,csno,cuser,cdate,ctime,cstr, nbytes,cuser2,cdate2,ctime2,cstr2, nbytes2 && To findout last serial number lcText = FILETOSTR("c:\myfile.txt") lnLines = ALINES(aTextLines,lcText,.T.) FOR lnI = 1 TO lnLines ENDFOR && this procedure is starup prg csno=lnI && last serial number+1 cuser=ALLTRIM(STR(RAND()*10))&& user name cdate=DTOC(DATE()) && date ctime=TIME() && time cstr=ALLTRIM(STR(csno))+CHR(9)+ALLTRIM('user')+cuser+CHR(9)+cdate+CHR(9)+ctime nbytes = strtofile(cstr+ chr(13) + chr(10),+"c:\myfile.txt",1) && this procedure runs when exe stopped cuser2=ALLTRIM(STR(RAND()*10)) cdate2=DTOC(DATE()) ctime2=TIME() cstr2=ALLTRIM('user')+cuser2+CHR(9)+cdate2+CHR(9)+ctime2 nbytes2 = strtofile(cstr2, "c:\myfile.txt",1)I want to add cstr2 at the end to then last line instead of new line