App Action on Session Close

Product: PowerShell Universal
Version: 4.53

I created a custom app that works with files the user either downloads directly to the PSU server or a custom file they upload through the app. I wanted to see if there is any way to clean up files once the specific app session closes.

If there isnt a native way to do this I suppose I can do it by querying active sessions