writing data into the pendrive using max3421.

i am trying to make a data logger, though i know it would have been much easier to make it with an sd card given how many resources and supporting libraries are available but my application requires physical dismounting of device every 3 hours, and it would be better if i used a pendrive in this case, trivialities aside, its been a while since i have been looking for information on how a file management system can be implemented on a microcontroller(stmf103c8t6 aka bluepill) and how these file management system functions would be relayed to usb mass storage device through max3421, and is it even possible.i would be really grateful for any kind of help offered.

thank you.