more graceful error on failure to open database