Bugfix: locking two different files in the same directory caused an error during the last unlocking