fails(does not work on headless CI server):IO#tty? returns true if this stream is a terminal device (TTY)
