Don’t be sorry for asking for help 
Unfortunately I’m not familiar with the sharing strategies, so I don’t know it setting it to file_system helps.
Did you read it somewhere?
I cannot see, where you are opening a lot of files without closing them. Could you post the whole code please?
Also, besides the error you are seeing, your code is a bit dangerous, since you have a loose mapping between the input and target. While the file is loaded using index in __getitem__, you are using a target_counter to load the target. If you set shuffle=True in the DataLoader your data will be randomly assigned to the next target.
To fix this, you could pass index to load_file and use targets[index].