As per my comments, I am not skilled in this field. Some Googling (a scarce subject this) gave some pointers, see my links below. I am however not sure where you should start looking, follow the links as it did cover a lot around UDC. It seems the problem is with your USB detection and not the file. It might help to reach out to the KVM community as they will be skilled in this field.
To cover both and from what I could gather for fault checking steps -
1. Check that the file is named correctly as 'UDC' and that it exists in the specified location. Make sure that you are providing the correct path to the file. Use the command 'ls' or 'dir' to list the files of the directory and verify that your file exist in the specified path/directory.
2. Make sure that you have appropriate permissions to read the file.
3. Make sure that your system has USB support enabled. Some virtualized environments or configurations might restrict or disable USB access.
4. Check that there are no UDC devices connected or available on the system. Ensure that the USB device you are trying to interact with is properly connected, powered on, and functioning correctly. Try connecting a different USB device to see if it can be detected by your code.
5. Check for any software or driver updates for the USB subsystem on your pc. Outdated or incompatible drivers could cause issues with UDC detection.
6. Use different USB devices or test the code on a different pc to determine if the issue is related to the code or your specific environment.
Google Returned Links To Assist In UDC Detection[
^]
Change log for linux-kvm package[
^]