Optimistic Locking in FileStore implemented plus minor fixes