in reply to delete a file

Pardon me for asking stupid questions, but why aren't you just using > instead of deleting the file and using >>?