Added debug statement for sql query.