fix db file access

Signed-off-by: xiehuc <xiehuc@gmail.com>