only clear screen if stdout is a tty