static bool WriteToFile(string path, IEnumerable<string> lines) { try { File.AppendAllLines(path, lines); return true; } catch(IOException) { return false; } }