added db query logger