Project can not be saved - the project is corrupt

I had this happening once, it was totally my own fault.
I have modified my Mixdown script to create mp3, m4a and Flac versions of the resulting Wav file.
I had a pause in there to keep the Command Line interface stay open, when finished.
If I don’t close this window, and try to save I get this error.
Closing the CLI and I can save the project successfully.
This leaves me to believe that there could be a process that is not finished or returns the wrong message.
DOP would be a strong contender.
I know, not really helpful, but gives a little context.