adding fixup for dirs and database creation