Save Dialog Message and Empty path names
<p>I am currently working <code>Open file</code> and <code>write file</code> functions in C#. I am going through two problems: When the user is in the process of saving a file, if he/she exits the save dialog and nothing is saved I get an error(look at picture below for description). How can my program avoid this and not crash? and Is there away to display a message after the file has been saved?</p>

<p><img src="http://i.stack.imgur.com/1H1yw.png" alt="enter image description here"></p>

<pre><code> private void button2_Click(object sender, EventArgs e)
            {
                SaveFileDialog saveReport = new SaveFileDialog();
                saveReport.Filter = "Text Files | *.txt";
                saveReport.ShowDialog();

                StreamWriter writeFile = new StreamWriter(saveReport.FileName);
                writeFile.Write(textBox1.Text);
                writeFile.Close();

            }
</code></pre>
