Added the possibility to debug the last query.