Saving Image not writing to file

I have a base64 string that I turn into a BufferedImage using ImageIO

Before manipulating it, I want to save to a local drive.

from javax.imageio import ImageIO
from import File

file_name = "E:\\" + name + "_image.jpeg"
outputFile = File(filename)
ImageIO.write(image, "jpeg", outputFile)

When I run it via the script console on Ignition, it writes to the drive with no errors. However when I have it on a script and run it, the image does not write. The rest of the program runs and does not stop at this step.

Does anyone know why it would work in script console but not as ignition script?

Where is the script running? As a tag change event or other tag event, the script will run in the gateway and attempt to write there.

It runs as a Tag Change.

Does the gateway have a physical E: drive, or a mapping in ignition.conf for an E: drive? If so, look for your file there.