Wrap Console.WriteLine call in a method