How can someone corrupt an NTFS filesystem with a user space application

So the question may look strange. I've encountered many times a folder that cannot be deleted on a NTFS filesystem unless the PC was rebooted. When this happens, the issue is not a permission things, even the local administrator can't deal with it. But reboot the PC and the folder is gone.

Even this Microsoft post says that it is a possible behaviour

Now, I have an application that creates a temporary folder, write inside it and deletes it afterward. Sometime, this application crashes because it cannot delete the files inside that folder. When I look at it, the temporary folder is empty and show the behaviour described above.

So my question goes as follow : How can my software do that? I would like to debug this but I have no clue where to start as I would expect the filesystem to be robust when accessed through the WinAPI. My application is a C# .Net 4.5 application.

Is there known vulnerabilities on the NTFS filesystems that could result in bad sectors? We're talking about Windows 7. This looks a lot like a race condition scenario.