Output to log.txt if no tty