Added error control for existing db folders
Added error control for existing db folders