add check for missing database directory