fixing log:outputString for queries (obs from Ruben Verborgh at https://github.com/RubenVerborgh/RestoProof/blob/master/step-count.n3)