use stderr instead if tty to work with no terminal #352
Fixing problem with tty #352