public static void copyFile(Path file, Path destination, boolean withAttributs) throws IOException {
        if ((file == null) || !Files.exists(file, LinkOption.NOFOLLOW_LINKS) || (destination == null)) {
            IllegalArgumentException iae = new IllegalArgumentException("The file is null or points to an invalid location!");
            Main.handleUnhandableProblem(iae);
        }

        if (withAttributs) {
            Files.copy(file, destination, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);

        } else {
            Files.copy(file, destination, StandardCopyOption.REPLACE_EXISTING);
        }
    }