KindleGen Error on Compiling & Corrupted File

I have tried compiling to Kindle with Scrivener 3 several times now and keep getting the same file copy error message and a corrupted file with a mixed up ToC. The latest version of KindleGen is in my applications folder, so that’s not the issue. See the image below for the error message.

Well, is there a previous version of the file in the My Kindle Content folder?


Yes, there were a .mobi as well as a .mbp file in there. But, it threw me because I’m saving my file to the desktop. What I discovered since earlier is that when you load the compiled .mobi file, it gets copied into the Kindle library. So, if you generate the .mobi again and try to open the new version, it causes the error unless you manually delete the files again. That’s kind of a pain.

As for the ToC problem, I haven’t solved it yet other than discovering it has something to do with the front matter. When I exclude it, the ToC comes out okay.