```dart
import 'package:amplify_flutter/amplify_flutter.dart';

Future<void> downloadPrivateFile({
  required String key,
  required String downloadPath,
}) async {
  final awsFile = AWSFile.fromPath(downloadPath);
  const options = StorageDownloadFileOptions(
    accessLevel: StorageAccessLevel.private,
  );

  try {
    final result = await Amplify.Storage.downloadFile(
      key: key,
      localFile: awsFile,
      options: options,
    ).result;

    safePrint('Downloaded file is located at: ${result.localFile.path}');
  } on StorageException catch (e) {
    safePrint('Something went wrong downloading the file: ${e.message}');
    rethrow;
  }
}
```
