It's easy to overwrite (clobber) existing files when you are redirecting output to a file. To prevent this from happening you need to set the noclobber shell variable by adding a line to your shell start-up file.
Depending on which shell you are using this is: