>  How can that be

">" only captures STDOUT, not STDERR. So the file.txt should be a subset of what's displayed on the console.