Make the FileDB<> class threadsafe.