public void createNewFile(File file, String dir) {
        if (file == null) {
            System.out.println("Error: File is null");
        }
        if (dir == null) {
            System.out.println("Error: Dir is null");
        }
        if (file == null || dir == null) {
            return;
        }
        this.file = file;
        this.dir = dir;
        try {
            new File(this.dir).mkdirs();
            this.file.createNewFile();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return;
    }