adding a query into work dir