Making more robust file retrieval