Introduce methods namedir() and instancedir()
Improve logging
Implement recovery
Check size before recovery