anchor.diff:    Future<bool> downloadFile(String fileId, String dir) {
       final completer = new Completer();
   
  -    drive_get(fileId).then((GoogleDriveClient.File file) {
  +    String fileTitle = '';
  +
  +    drive_get(fileId)
  +    .then((GoogleDriveClient.File file) {
         if (file.mimeType == mimeFolder
           || file.downloadUrl == null) {
  -        completer.complete(false);
  -      } else {
  -        LibHttp.get(
  +        throw new Exception('[PinGoogleDrive] downloadFile: Wrong file type: ${file.mimeType}');
  +      } else {
  +        fileTitle = file.title;
  +        return LibHttp.get(
               file.downloadUrl,
               headers: {'Authorization': 'Bearer ' + _oauth.oauth2.credentials.accessToken}
  -        ).then((response) {
  -          new File(LibPath.join(dir, file.title))
  -            .writeAsBytes(response.bodyBytes)
  -            .then((_) => completer.complete(true));
  -        });
  -      }
  +        );
  +      }
  +    })
  +    .then((response) => (new File(LibPath.join(dir, fileTitle))).writeAsBytes(response.bodyBytes))
  +    .then((_) => completer.complete(true))
  +    .catchError((e, trace) {
  +      PinUtility.handleError(e, trace);
  +      completer.completeError(e, trace);
       });
   
       return completer.future;
  
positive.code:       } else {
          // still has next page, retrieve it
          drive_list(maxResults: maxResults, pageToken: response.nextPageToken, queries: queries)
            .then((nextResponse) => listPageOfFiles(nextResponse));
        }
      }
  
      drive_list(maxResults: maxResults, queries: queries)
        .then((GoogleDriveClient.FileList response) => listPageOfFiles(response));
  
      return completer.future;
    }
  
negative.code:         }
  
          GoogleDriveClient.File file = new GoogleDriveClient.File.fromJson(metadata);
          _drive.files.insert(file)
          .then((GoogleDriveClient.File newFile){
            completer.complete(newFile);
          })
          .catchError((e, trace) {
            PinUtility.handleError(e, trace);
            completer.completeError(e, trace);
          });
        }
      });
  