@Override
    public boolean check() {
      String[] pieces = RelativePathCalculator.split(myAfterName);
      VirtualFile parent;
      try {
        parent = makeSureParentPathExists(pieces);
      }
      catch (IOException e) {
        setErrorMessage(cantCreateFileMessage(myAfterName, e));
        return false;
      }
      if (parent == null) {
        setErrorMessage(fileNotFoundMessage(myAfterName));
        return false;
      }
      String name = pieces[pieces.length - 1];
      File afterFile = new File(parent.getPath(), name);
      final VirtualFile file;
      try {
        //if user already accepted overwriting, we shouldn't have created a new one
        file = myDelayedPrecheckContext.getOverridenPaths().contains(VcsUtil.getFilePath(afterFile))
               ? parent.findChild(name)
               : createFile(parent, name);
      }
      catch (IOException e) {
        setErrorMessage(cantCreateFileMessage(myAfterName, e));
        return false;
      }
      if (file == null) {
        setErrorMessage(fileNotFoundMessage(myAfterName));
        return false;
      }
      // See VcsFileListenerContextHelper javadoc
      myAddedPaths.add(VcsUtil.getFilePath(file));
      if (!checkExistsAndValid(file, myAfterName)) {
        return false;
      }
      addPatch(myPatch, file);
      return true;
    }
@Override
    public boolean check()