replace Console.Writeline with logger