You should be able to use the DeleteFile command without any issues.
One of the things I discovered in including files is that you need to make sure that there is an end-of-line at the end of the file. That sounds like what you are running into.
And it is best to include files at the start of a file, not in the middle or end if you can help it.
Include files should contain only variable declarations or functions.
These are not rules of any sort, just things I've discovered that help things go smoothly.
(I never use GoSub as a matter of principle. I like my routines, whether they return something or not, to be totally contained. And GoSub with labels just doesn't work for me.)
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master