Q:

C# textfile only contains last string written to file with StreamWriter

I'm writing a Chat Program in C# (Windows Forms Application), the solution contains to projects which both consist of one form ( see picture ).  While sending messages to each other works, I'm trying to record the conversation session in a .txt file named dateTime.txt using StreamWriter.  Creating the file if it does not exist yet works, but whenever I open the text file, it only contains the last string that was written to it instead of containing the whole "conversation".  
Does anybody know how to fix this?  

This is the code of one of the forms, but since the forms do exactly the same, the code is the same too so i'm only posting the code of one Form.  Would be great if somebody knows what I have to change so the whole conversation is recorded in the text file. 
namespace Assignment3Client
{
    public partial class Chat : Form
    {
        NamedPipeClientStream clientPipe = new     NamedPipeClientStream("pipe2");
        NamedPipeServerStream serverPipe = new NamedPipeServerStream("pipe1");
        string msg = String. Empty;
        string msgStr;
        string name;
        byte[] ClientByte;

        public Chat()
        {
            InitializeComponent();
        }

        private void btnStartChat_Click(object sender, EventArgs e)
        {
            this. Text = "Waiting for a connection....";

            if (txtBoxName. Text. Length == 0)
            {
                MessageBox. Show("please enter a name first."); 
            }
            else
            {
                name = txtBoxName. Text;
                clientPipe. Connect();
                serverPipe. WaitForConnection();
                if (serverPipe. IsConnected)
                {
                    this. Text = "You are connected, " + name + "!"; 
                    btnStartChat. Enabled = false;
                    btnSend. Enabled = true;
                    txtBoxMsg. Enabled = true;
                    txtBoxMsg. Focus();
                    receiveWorker. RunWorkerAsync();
                }
            }

        }

        private void btnSend_Click(object sender, EventArgs e)
        {
            msg = "[" + name + ": " + DateTime. Now + "]  " + txtBoxMsg. Text;
            txtBoxChat. AppendText(msg + "\n");
            FileWriter(msg);
            sendWorker. RunWorkerAsync(msg); //start backgroundworker and parse msg string to the dowork method
            txtBoxMsg. Clear();
            txtBoxMsg. Focus();

        }

        private void sendWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            Byte[] msgByte = System. Text. Encoding. GetEncoding("windows-1256").GetBytes(msg);
            serverPipe. Write(msgByte, 0, msg. Length);
        }

        private void receiveWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            ClientByte = new Byte[1000];
            int i;
            for (i = 0; i < ClientByte. Length; i++)
            {
                ClientByte[i] = 0x20;
            }

            clientPipe. Read(ClientByte, 0, ClientByte. Length);
            msgStr = System. Text. Encoding. GetEncoding("windows-1256").GetString(ClientByte);
            receiveWorker. ReportProgress(i, msgStr);
        }

        private void receiveWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            if ((string)e. UserState == String. Empty)
            { MessageBox. Show("no message"); }
            else
            {
                string message = (string)e. UserState;
                txtBoxChat. AppendText(message);
                FileWriter(message);
                txtBoxChat. BackColor = System. Drawing. Color. DarkBlue;
                txtBoxChat. ForeColor = System. Drawing. Color. White;

            }
        }
        private void receiveWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (clientPipe. IsConnected) 
            {
                receiveWorker. RunWorkerAsync();
            }
            else
            {
                txtBoxMsg. Enabled = false;
                btnSend. Enabled = false;
                MessageBox. Show("Connection lost");

            }
        }

        private void Chat_Activated(object sender, EventArgs e)
        {
            txtBoxChat. BackColor = new System. Drawing. Color();
            txtBoxChat. ForeColor = new System. Drawing. Color();
        }

        private void exitMenuStrip_Click(object sender, EventArgs e)
        {
            this. Close();
        }

        private void conMenuSrip_Click(object sender, EventArgs e)
        {

        }

        private void errMenuStrip_Click(object sender, EventArgs e)
        {

        }

        public void FileWriter(string message)
        {
            string path = @"C:\Users\selin\Documents\TAFE\Term 3\dateTime.txt";
            FileStream conLog;
            if (! File. Exists(path))
            {
                conLog = new FileStream(path, FileMode. Create);
            }
            else
            {
                conLog = new FileStream(path, FileMode. Open);
            }
            StreamWriter writer = new StreamWriter(conLog);
            writer. WriteLine(message);
            writer. AutoFlush = true;
            writer. Close();
            MessageBox. Show("written to file" + message);
        }
    }
}

A:

in FileWriter(string message) change
conLog = new FileStream(path, FileMode. Open);

to 
conLog = new FileStream(path, FileMode. Append);

