Print exception in dbstatecheck.
Merge pull request #953 from arjclark/dbstatecheck.catch_err

dbstatecheck.py: print exception