Fix recursive file retrieval