Added stack trace for DB queries