How can you set up the gateway to make new folders?

I want to make it such that on a Gateway Tag Change, under certain conditions, I am going to make a folder with todays date and store a .csv file in it with some data. However right now I can’t even seem to get it to make a folder. Here’s the relevant part of my Gateway Tag Change Script

import os
saveDirectory = "C:\\Users\\Public\\Documents\\DataExport"
logger.info("1")
os.mkdirs(saveFileDirectory, exist_ok=True)				
logger.info("2")

but it never gets to 2. I am not sure whats wrong. I am using Ignition 7.9.9

You probably need to make sure the LOCAL SERVICE Windows user has write permissions wherever you want to write to.

I’m using Windows 10, where do I set those permissions?

Right-click on a folder, Properties, Security tab?