More granular logging for database errors.

md5sum a.out
dad540f6ee35f6ee4e4eca286aa58006  a.out