log history db failure before calling init_db
log history db failure before calling init_db

if init_db is where the failure occurs,
we will never see the message due to infinite recursion.

This does not fix the infinite recursion itself.
ipython/ipython,ipython/ipython