Close database after dumping
Close database after sampling