Hello, In stable branch + milprint_summer, executing the following query (you need to have a "hello.xml" doc shredded in collection "hello"): let $path := 'backup/test/hello/' let $index := element documents { for $document at $pos in pf:documents('hello') let $uri := concat($path, string(10000 + (($pos div 10000)) cast as xs:integer), '/', string($pos) , '.xml') return (text { " " }, element document { attribute uri {$uri}, $document/text() }), text { " " } } return (put($index, concat($path,'documents.xml')), for $document in $index/document return put(exactly-one(doc(string($document))), exactly-one($document/@uri))) Results in the first 'put' is done, while the second 'put' is not executed, actually, the MIL code generated by 'pf' contains only translation of (the first) one 'put'. Also, the query gives a warning: query will always return an error If I comment out the first 'put', the second 'put' in the for-loop get executed, *without* the warning. Executing a similar query: (put(<a/>, "a.xml"), for $n in ("b.xml", "c.xml") return put(exactly-one(doc("hello.xml")), $n) ) also results in the warning, however, the generated MIL code contains translation of both 'put' and three documents are put in dbfarm. I'd like to know why the first query fails, and what has triggered the warning. Thanks a lot! Kind regards, Jennie