Fix: checking for db existence