support closing db