My .json file isnt saving

I have a simple discord bot used for tracking how much donations my team has donated. I save it into a coins.json file using this.

fs.writeFile("./coins.json", JSON.stringify(coins), (err) => {
if(err) console.log(err)
});

This worked for the last 2-3 days, but today it randomly stopped saving. I have tried running refresh in the console after I updated the contributions in discord and it just resets the coins.json file back to what it was.

This similar issue happened on this thread, I did address it! (link above) @MonkleeGamer. It would be best to use a database package rather than storing on JSON because it will corrupt easily.