private void CloseStream() { if ( streamWriter == null ) { return; } streamWriter.Close(); streamWriter.Dispose(); streamWriter = null; }