public File saveSVGDialog(final JComponent parent) {
    File start = HOME;
    if(LAST_DIR.exists()) {
      try {
        final Scanner s = new Scanner(LAST_DIR, UTF8);
        if(s.hasNextLine()) {
          start = new File(s.nextLine().trim());
        }
        s.close();
      } catch(final IOException e) {
        // no worries
      }
    }
    final JFileChooser choose = new JFileChooser(start);
    choose.setFileFilter(new FileNameExtensionFilter("Vector image (*.svg)",
        "svg"));
    final boolean approved =
        choose.showSaveDialog(parent) == JFileChooser.APPROVE_OPTION;
    final File res = approved ? choose.getSelectedFile() : null;
    if(res == null) return null;
    final File par = res.getParentFile();
    final String name = res.getName();
    try {
      final PrintWriter pw = new PrintWriter(LAST_DIR, UTF8);
      pw.println(par.toString());
      pw.close();
    } catch(final IOException e) {
      // no worries
    }
    if(!name.contains(".")) return new File(par, name + ".svg");
    return res;
  }