2-Way Sync programs can mess the Library up bad. It may be trying to put something old back while Calibre is in the process of moving files (a author/title rename) Or it changes the filename as part of its versioning service
2-users accessing the same Library is almost worse. The DB is in RAM and gets written as needed. What does not happen is get refreshed in RAM because it assumes sole use (multi-user DB's are way more tricky.)
(auto) File Cleaning tools