fixed logging, enhanced db mode