Adding check for db existence before dropping tables