anchor.diff:      if (condition) {
         return;
       }
  -    throw new FormatException('Wrong format: {$message}.');
  +    throw new FormatException('Wrong format: ${message}.');
     }
   
  -  static Object readJsonFileSync(String path) {
  -    Object data;
  +  static HashMap readJsonFileSync(String path) {
  +    HashMap data = new HashMap();
   
       File file = new File(path);
       String fileContent = '';
  
positive.code:   static void setCwdToRoot([String relative = '']) {
      String root = LibPath.join(LibPath.dirname(Platform.script.toFilePath()), relative);
  
      PinLogger.instance.fine('[PinUtility] Set Directory.current to: $root');
  
      Directory.current = root;
    }
  
negative.code:     }
  
      return result;
    }
  
    static bool checkDirExistsSync(String path, {bool createWhenNotExist: false}) {
      bool result = false;
      Directory dir = new Directory(path);
  
      if (!dir.existsSync() && createWhenNotExist) {
        try {
          dir.createSync(recursive: true);
          result = true;
        } catch(e) {
          PinLogger.instance.warning('[PinUtility] checkDirExistsSync: Create dir failed: ${path} with Exception: ${e}');
        }
      } else {
        result = true;
      }
  
      return result;
    }
  
    static Future<bool> createDir(String path) {
      final completer = new Completer();
      Directory dir = new Directory(path);
  
      dir.exists().then((bool exists) {
        if (exists) {
          completer.complete(true);
        } else {
          dir.create(recursive: true).then(() {
            completer.complete(true);
          }).catchError((e) {
            handleError(e);
            completer.complete(false);
          });
        }
      });
    }
  
    static void handleError(e) {
      PinLogger.instance.shout('Error: ${e}');
    }
  
  }