STDOUT is not tty, reopen /dev/tty.

And old reopen STDOUT at last.