Fix query for file retrieval.