Delphi help needed.

Job ID: 36926388

Budget: $10 – $30 USD

procedure TForm7.textwClick(Sender: TObject);
var
AppDataPath: string;
F: TextFile;
begin
AppDataPath := ExpandFileName(GetEnvironmentVariable('APPDATA'));
AssignFile(F, (AppDataPath + '\grssd\xlr.TEXT'));
Rewrite(F);
WriteLn(F, form11.memo3.Text);
CloseFile(F);
end;



This is the code i use to write data into a text file.
It reads what ever is inside the memo3, and puts it into a text file.
it works perfect, adding new lines for each time i click the textwclick button.

However, when i close down my progra and read the current text file, its also fine.
However, when i re-open it and try to write into the text file, it wipes over the existing lines.

I need the above code fixed slightly so that when i close my app, and reopen it, it writes a new line when i click the button,
and not overwrite the lines.