Add method for checking if a name is already used
Implement PersistenceManager and add tests.
Add missing close() call