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

Instead of dying later with a message about prepare failing
Is this else block needed? It seems the line in the if block will be fatal.