csv files write issud

Hello there!
I am using pocketbeagle to acquire ADC data and log into csv files. Some time i am getting csv write issue like the shown in the below image. I am storing the data into DDR then the DDR Data will be written into CSV. can anybody help?

Would need to see the code you are using as that is the most likely cause for the corruption.