Make local_database_settings import and exception more specific.