debug fn. + database details