Yes, you should open the file with OpenFile, and then seek to the end of the file using SeekFile:
fname$ = "test2.dat" SeedRnd(MilliSecs()) ;test if file exists test = FileType(fname$) ;if it doesn't If Not test Then ;createfile file = WriteFile(fname$) ;if it does Else ;open file file = OpenFile(fname$) ;seek to end of file SeekFile file, FileSize(fname$) End If ;add line and close file WriteLine file, "testline " + Rand(255) CloseFile file ;print file file = ReadFile(fname$) While Not(Eof(file)) Print ReadLine(file) Wend CloseFile file WaitKey() End