Assigning a file from iCloud Drive as a widget?

Hello, I’m rather new to this community, and I was wondering if I could get any feedback on this problem I have been having. The following code works when run in the app, but not in the widget


let fm = FileManager.local()
let splashPath = "/private/var/mobile/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents/splashesImage.png"
await fm.downloadFileFromiCloud(splashPath)
let w = new ListWidget()
w.backgroundImage = fm.readImage(splashPath);
Script.setWidget(w)
w.presentSmall()
Script.complete()

You will need to add a bookmark to the Documents Folder in the Scriptable settings. Then you can access it using

let splashPath = fm.bookmarkedPath('[bookmark name]') + '/splashesImage.png'