anchor.diff:      final completer = new Completer();
       File file = new File(path);
   
  -    Future<GoogleDriveClient.File> upload(String path, String driveId) {
  -      final completer = new Completer();
  -      file.readAsBytes().then((List<int> content) {
  -        drive_update(driveId, content).then((GoogleDriveClient.File updatedFile) {
  -          completer.complete(updatedFile);
  -        });
  -      });
  -      return completer.future;
  -    }
  -
  -    file.exists().then((bool exists) {
  +    file.exists()
  +    .then((bool exists) {
         if (!exists) {
  -        PinLogger.instance.warning('[PinGoogleDrive] uploadFile: Target file does not exist: ${path}');
  -        completer.complete(null);
  +        throw new Exception('[PinGoogleDrive] uploadFile: Target file does not exist: ${path}');
         } else {
           if (driveId == null) {
             // need to create file first, then update it
  -          drive_insert(path, parents: parents).then((GoogleDriveClient.File newFile) {
  -            upload(path, newFile.id).then((GoogleDriveClient.File uploadedFile) {
  -              completer.complete(uploadedFile);
  -            });
  -          });
  +          return drive_insert(path, parents: parents);
           } else {
             // file already exists, update it
  -          upload(path, driveId).then((GoogleDriveClient.File uploadedFile) {
  -            completer.complete(uploadedFile);
  -          });
  +          return new Future.value(null);
           }
         }
  +    })
  +    .then((GoogleDriveClient.File newFile) {
  +      if (newFile != null) {
  +        // means last step is insert new file
  +        driveId = newFile.id;
  +      }
  +      return file.readAsBytes();
  +    })
  +    .then((List<int> content) => drive_update(driveId, content))
  +    .then((GoogleDriveClient.File uploadedFile) => completer.complete(uploadedFile))
  +    .catchError((e, trace) {
  +      PinUtility.handleError(e, trace);
  +      completer.completeError(e, trace);
       });
   
       return completer.future;
  
positive.code:       });
        metadata['parents'] = metaParents;
      }
      GoogleDriveClient.File file = new GoogleDriveClient.File.fromJson(metadata);
      _drive.files.insert(file).then((GoogleDriveClient.File newFile){
        completer.complete(newFile);
      });
  
      return completer.future;
  
negative.code:     } else if (content is List<int>) {
        base64content = CryptoUtils.bytesToBase64(content);
      } else {
        try {
          throw new Exception('[PinGoogleDrive] drive_update: Invalid content type: ' + PinUtility.getVariableTypeName(content));
        } catch (e, trace) {
          PinUtility.handleError(e, trace);
          completer.completeError(e, trace);
        }
      }
  
      _drive.files.get(fileId)
      .then((GoogleDriveClient.File file) {
        return _drive.files.update(file, fileId, content: base64content);
      })
      .then((GoogleDriveClient.File updatedFile) {
        completer.complete(updatedFile);
      })
      .catchError((e, trace) {
        PinUtility.handleError(e, trace);
        completer.completeError(e, trace);
      });
  
      return completer.future;
  