include sql query in query failure messages