using (FileStream fs = new(fileName, FileMode.OpenOrCreate, FileAccess.Write)) { using (StreamWriter sw = new(fs)) sw.WriteLine(message); }