added sketch of retrieveFile implementation