Report the exception type if remove_study fails and change deletion test to use study 12
Start to implment repo locking to prevent write operations from stepping on each other