extended database error checking