change from db.file to db.dir