Pass `databases` to `check_databases`
Test exception handling in `check_database`