static void Main(string[] args) { var argData = new ArgData(args); if (!argData.Clean()) { Console.WriteLine("Sorry, there was a fatal error with your arguments"); return; } var parsed = ParseFile(argData.InputPath, argData.SlnPath, argData.Indent); using (var writer = new StreamWriter(argData.OutputPath)) { writer.Write(parsed); writer.Flush(); } Console.WriteLine("Done."); }