public boolean performFinish() {
    FeatureModel featureModel = new FeatureModel();
    featureModel.createDefaultValues("");

    Path fullFilePath = new Path(page.fileName.getText());
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IPath rootPath = root.getLocation();
    if (rootPath.isPrefixOf(fullFilePath)) {
      // case: is file in workspace
      int matchingFirstSegments = rootPath.matchingFirstSegments(fullFilePath);
      IPath localFilePath = fullFilePath.removeFirstSegments(matchingFirstSegments);
      String[] segments = localFilePath.segments();
      localFilePath = new Path("");
      for (String segment : segments) {
        localFilePath = localFilePath.append(segment);
      }
      IFile file = root.getFile(localFilePath);
      featureModel.initFMComposerExtension(file.getProject());
      try {
        new FeatureModelWriterIFileWrapper(new XmlFeatureModelWriter(featureModel))
            .writeToFile(file);
        file.refreshLocal(IResource.DEPTH_INFINITE, null);
      } catch (CoreException e) {
        FMUIPlugin.getDefault().logError(e);
      }
      open(file);
    } else {
      // case: is no file in workspace
      File file = fullFilePath.toFile();
      new XmlFeatureModelWriter(featureModel).writeToFile(file);
    }
    return true;
  }