Refactoring usage of dumpDB