My test case is a little different.
I see in your example you did not MKFS and create the files on first insertion, assuming they were created some other time:

In my example I create the filesystem and files on first insertion each time and then the reinsert fails.
I have modified your example and tested, here is the output:

I am attaching the modified project, which I also changed to use semihosting with a J-Link, linked to RAM.