Hello Tyler,
why don't you use the 'Delete' functions inside the file palette?
Some structure like this should be useful:
IF file_is_available THEN delete(file)
IF error THEN warn(user)
Check the error cluster after the delete function, maybe the user has no sufficient privileges the delete the file...
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019