You have two choices. You can recreate the file each time (which will eventually crash the card), or you can open the file in indexed mode and make a circular buffer there. It's far too complicated to explain the whole thing here, it would amount to doing the entire job for you. You should contemplate a simpler method like saving a daily log and deleting them later, if you can't manage the programming for a circular buffer file.
However, you could log about 1000 days of 5m of data per day, on an 8Gb card. Are you expecting data to be intact if power is lost? If not, you will have to open and close the file each time you access it.
I think the data size got lost in translation, you never told me how big a single log entry is.