public void log(String content) {
        try {
            if ( !Files.exists(dir, LinkOption.NOFOLLOW_LINKS) )
                Files.createDirectory(dir);

            content += System.getProperty("line.separator");
            Files.write(file, content.getBytes(), StandardOpenOption.CREATE,
                                                  StandardOpenOption.APPEND);
        } catch (IOException ex) {
            System.err.println("Nelze zapisovat do log souboru " + file);
        }
    }