Die with a useful error if we can't connect to the logging DB

Instead of dying later with a message about prepare failing
@ebelter, are you meaning to remove the `else` and just unindent its body?