@Override
    protected Integer doInBackground() {
        Logger.getLogger(ReportGenerator.class.getName()).entering(ReportGenerator.class.getName(), "doInBackground");
        try {
            nbrOfAlbums = 0;
            nbrOfProcessedAlbums = 0;
            findNbrOfAlbums();
            try {
                pageXWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(reportFolder + "index.html")), "UTF-8"));
                cssFileWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(reportFolder + "style.css")), "UTF-8"));
                createCss();
                copyImages();
                createHeader(pageXWriter);
                createContent();
                if (cancelAsked) {
                    Logger.getLogger(ReportGenerator.class.getName()).exiting(ReportGenerator.class.getName(), "doInBackground", 7);
                    return 7;
                }
                createFooter();
            } catch (FileNotFoundException | UnsupportedEncodingException ex) {
                Logger.getLogger(ReportGenerator.class.getName()).log(Level.SEVERE, "Error with the files during the reporting", ex);
                new InfoInterface(InfoInterface.InfoLevel.ERROR, "report-files");
            } catch (IOException ex) {
                Logger.getLogger(ReportGenerator.class.getName()).log(Level.SEVERE, "IO error during the reporting", ex);
                new InfoInterface(InfoInterface.InfoLevel.ERROR, "report-IO");
            }
            try {
                pageXWriter.close();
                cssFileWriter.close();
            } catch (IOException ex) {
                Logger.getLogger(ReportGenerator.class.getName()).log(Level.SEVERE, "IO error while closing the report files", ex);
                new InfoInterface(InfoInterface.InfoLevel.ERROR, "report-IO");
            }
            if (cancelAsked) {
                Logger.getLogger(ReportGenerator.class.getName()).exiting(ReportGenerator.class.getName(), "doInBackground", 7);
                return 7;
            }
            OSBasics.openFile(reportFolder);
            OSBasics.openURI("file://" + reportFolder.replace('\\', '/').concat("index.html"));
        } catch (Exception ex) {
            Logger.getLogger(ReportGenerator.class.getName()).log(Level.SEVERE, "Unknown exception", ex);
            new InfoInterface(InfoInterface.InfoLevel.ERROR, "unknown");
        }
        Logger.getLogger(ReportGenerator.class.getName()).exiting(ReportGenerator.class.getName(), "doInBackground", 0);
        return 0;
    }