General fixes. Added the db path management