Added logic for retrieving a specific file and directory contents