Hi,We've been having this issue for a while and we think resolving it may be the key to resolving an intermittent server 500 error that we've been having.When a user tries to save a file while a batch process is running, BaseX saves duplicates of the file.How to reproduce:1) Take a fresh BaseX 9.0.1 installation2) Copy the attached .xqm in webapp3) Create an empty DB called mydb4) Access localhost:port-num/test/create-update-a-lot-of-files to populate your db. 5) In OxygenXML, set a webdav connection to the db and open a file, add a character in one of the elements, but don't save the file.6) From the browser, access 'localhost:port-num/test/update-something' 7) While the process in the browser is still running, save the file in Oxygen. You'll get a message saying that read timed out. Click ok and do not try saving the file again.8) When the update-something process is done running, don't resave the file in Oxygen, instead go to localhost:port-num/test/oups-duplicates. You'll get a message saying that some files are duplicated. If you don't try again from step #4 a few times. You'll only get duplicates if you get the time out message before the update-something process is still running. If you try to save the file many times, you'll get more duplicates, 4 or 6.We're not sure if it's a BaseX bug or if we are setting our user management and/or locking rules incorrectly.Do you have any suggestions?--