added stracktraces for queries