If you are using external tools to download/prepare files, make sure that unfinished files are not “seen” by Plex (i.e. don’t download or rip directly into your Plex media folders).
Make sure that 2 concurrent library updates are not running at the same time.
If the above mentioned tools can trigger a library update in Plex, disable the ‘automatic’ and the ‘periodic’ library update in Plex itself.