Adding support for query timeout