Programmatically updating Media files not working anymore

I wonder if this is somehow connected to Failure to access csv file uploaded to Settings/Media