No, if you open with ">", it means "open a file for writing, creating a new file if needed or else truncating an old file" *) so amazingly, you can actually print to the file after you've opened (and cleared) it. You don't need to reopen with ">>" mode, because the only difference between them is that ">>" mode does not clear the file first.