 <p>1) <strong>I recommend that you check to see if this file is being written to already</strong> before you attempt to write to it.</p> <pre><code>void SaveTimer() { try { using (Stream stream = new FileStream(filename, FileMode.Open)) { yourTimer.Stop(); Save(); yourTimer.Start(); } } catch { Thread.Sleep(3000); } } } </code></pre> <ol start="2"> <li><strong>If possible, it is better to re-factor your code to avoid putting the thread to sleep.</strong></li> </ol>