Added handling for missing database