Use tee to get output to both stdout and file