Chipworkx USB mass storage eject error

Hi community.

i am using a chipworkx developement board, and i have it set up to connect the inserted sd card as usb mass storage.
I can access the data from the sd card fine, however i have been atempting to find a way to listen to media eject/safety remove from a windows machine.
until now i have had no progress at all. I can use the safety remove feature of windows, though i can not detect this change on the chipworkx. however, when i attempt to use the ‘right click drive -> eject’ feature of windows, windows thinks for a minute then tells me there was an error.

what i want to know is, is the error disconnecting a usb_MS error in not acknowledged the disconnect signal and stopping the client controller, or is it related to my debug loop atempting to monitor the clientcontroller state? also, if it is related to USB_MS class not acknowledging the disconnect, is there a way to use this to actually detect the disconnect signal from windows, and this stop the usb client controller and reconnect the sd card internally.

this code is being run in a new thread whilst my usb is connected in client mode. it outputs 6, then 5. produces no more output. when i safety remove and pull the usb cable out, the ‘suspended’ state is met and my program works fine (though i get ‘assert’ on the lcd when i reattached the usb)

USBClientController.State laststate = USBClientController.GetState();
            Debug.Print(laststate.ToString());
            while (USBClientController.GetState() != USBClientController.State.Suspended)
            {
                
                while (USBClientController.GetState() == laststate)
                    Thread.Sleep(1);
                Debug.Print(USBClientController.GetState().ToString());
                laststate = USBClientController.GetState();
            }