>> redirects to the file, appending to it. A single > will discard the previous contents.
You may also be interested in redirecting the error stream. It works the same except there will be an extra 2: 2> or 2>>. And finally to redirect the error stream to the output stream you can redirect to &1: 2>&1. Take note that this redirecting should be done after the output redirecting or the error stream will be redirected to the old output stream.