fix in console logger to avoid overflowing the stack in case Console.WriteLine fails