For comparison: in Linux such messages use
/dev/tty. AFAIK in DOS one could achieve similar results by using CON. I don't really know Windows; I don't know if CON is still supported in modern Windows systems. While I do know /dev/tty is the right way to do this in Linux, I can only guess CON is considered ancient and the right modern way in Windows is with WriteConsole or something.