refactor download filepath.