def to_files(self, folderpath=None):
        """
        Writes the html report to one file per report
        """
        if len(self.reports) == 0:
            self.warning(
                "No charts to save. Use stack to add charts for saving")
            return
        if folderpath is None:
            if self.report_path is None and "seaborn" \
                    not in self.report_engines:
                self.err("No folder path set for reports: please provide "
                         "one as argument or set ds.report_path")
                return
            folderpath = self.report_path
        else:
            if folderpath.startswith('/') or folderpath.startswith("."):
                pass
            else:
                folderpath = self.report_path + "/" + folderpath
        try:
            for report in self.reports:
                if "html" not in report:
                    self.err("No html for report " + report)
                    self.reports = self.report_engines = []
                    return
                if "seaborn_chart" in report:
                    if folderpath is None and self.static_path is None:
                        self.err("Please provide a folder path or set the "
                                 "static_path property")
                        return
                    self._save_seaborn_chart(report, self.static_path)
                else:
                    html = report["html"]
                    self._write_file(report["slug"], folderpath, html)
            self.reports = []
            self.report_engines = []
        except Exception as e:
            self.err(e, self.to_files, "Can not save reports to files")
            return
        self.ok("Data writen to files")