CmdStan (or StataStan) incorrectly processes "old" stan files

I am editing a file called foo1.stan, and running it with StataStan. All fine. But then I find an error, such as typing “parameter” when it needs to be “parameters” and ask Stata and StataScan to process foo1.stan again. But the old foo1.stan is processed. I can tediously fix this by calling my new file foo2.stan, changing the call to StataScan to refer to foo2.stan, and so on. The issue appears to be that foo1.stan was copied to c:\cdmdstan-2.16.0, and needs to be deleted there: I’m guessing that StataStan or CmdStan “sees” foo1.stan already there and ignores the new version it was asked by StataStan to process.

Is there some option in StataScan to delete old files like this? The “keepfiles” option seems to do the reverse, but I suspect that when keepfiles is not specified that the default is not to clean house completely.

I can hardcode Stata to clean house, but that is a bit inelegant.

Operating System: Windows 10
Interface Version: StataStan and CmdStan
Compiler/Toolkit: Rtools

This sounds like something that needs to be fixed in StataStan. CmdStan doesn’t copy the files. If you file an issue in that repo you are more likely to get the right person’s attention.