Might need to see the relevant parts of the script that generate the CSV file and call out it's file name.
Or at the minimum, where is the CSV file being stored?
1) on a network location somewhere
2) in the logged in user's directory
3) on the local machine in a secure folder that needs admin rights
Without much information to go on, I can only assume it tries to overwrite the same CSV file when it is run from another user, but the CSV file is locked by the first user it was run on, or was run by an admin account and created in an admin folder or something.