adding initial db util; adding permissions check to file util