@Override
    public void confirm(String mail, Integer... workshopIds) {
        File tempFile = new File(file.getAbsolutePath() + ".tmp");
        try (BufferedReader br = new BufferedReader(new FileReader(file)); PrintWriter pw = new PrintWriter(new FileWriter(tempFile), true)) {
            String line;
            boolean alreadyConfirmed = false;
            while ((line = br.readLine()) != null) {
                if (line.isEmpty())
                    continue;
                outer:
                if (line.startsWith(mail)) {
                    if(!alreadyConfirmed) {
                        String[] split = line.split(";");
                        if (split.length - 3 == workshopIds.length) {
                            for (int i = 3; i < split.length; i++) {
                                if (!split[i].equals(workshopIds[i - 3].toString())) {
                                    break outer;
                                }
                            }
                            pw.println(line.replace(";false;", ";true;"));
                            alreadyConfirmed = true;
                        }
                    }
                } else {
                    pw.println(line);
                }
            }
        } catch (IOException ex) {
            // should not happen?
            ex.printStackTrace();
        }

        if (!file.delete()) {
            throw new FileNotRemovableException();
        }
        tempFile.renameTo(file);
    }