I moved the unlink here.  Later on we check for errors by seeing if the file is empty.  But, if we don't delete it beforehand, that check doesn't mean much.