Both in Unix and also in Windows (NT and later, not 9x), console programs and scripts can write to two different output streams. They are called stdout and stderr. Normally (i.e. without any redirection) they both output to the screen. When you use the > and >> redirection symbols on their own (without a number 1 or 2 before them) you are redirecting just the stdout stream. Most programs use the stdout for their normal output and the stderr for their error messages.
If you want to make sure you only capture one of these streams you can put a number 1 (stdout) or a 2 (stderr) in front of the redirection symbols
program 1> output.txt 2> error.txt
by putting 2>&1 after the file name you combine the two streams.