test: ensure closing database that related with file