Wrapping SPARQL query executions with auxiliar function