      def check_folder(self):
          """ Check that the faces folder doesn't pre-exist
              and create """
          err = None
          if not self.faces_dir:
              err = "ERROR: Output faces folder not provided."
          elif not os.path.isdir(self.faces_dir):
              logger.debug("Creating folder: '%s'", self.faces_dir)
              os.makedirs(self.faces_dir)
          elif os.listdir(self.faces_dir):
 
</s> remove     def check_folder(self):
        """ Check that the faces folder doesn't pre-exist
            and create """
 </s> add     def _check_folder(self):
        """ Check that the faces folder doesn't pre-exist and create. """ </s> remove         elif not os.path.isdir(self.faces_dir):
            logger.debug("Creating folder: '%s'", self.faces_dir)
            os.makedirs(self.faces_dir)
        elif os.listdir(self.faces_dir):
            err = "ERROR: Output faces folder should be empty: '{}'".format(self.faces_dir)
 </s> add         elif not os.path.isdir(self._faces_dir):
            logger.debug("Creating folder: '%s'", self._faces_dir)
            os.makedirs(self._faces_dir)
        elif os.listdir(self._faces_dir):
            err = "ERROR: Output faces folder should be empty: '{}'".format(self._faces_dir) </s> remove         self.check_folder()
        self.export_faces()
 </s> add         self._check_folder()
        self._export_faces() </s> remove         logger.verbose("Creating output folder at '%s'", self.faces_dir)
 </s> add         logger.verbose("Creating output folder at '%s'", self._faces_dir) </s> remove     def export_faces(self):
        """ Export the faces """
 </s> add     def _export_faces(self):
        """ Export the faces to the output folder and update the alignments file with
        new hashes. """
        if not self._faces_dir:
      def check_folder(self):
          """ Check that the faces folder doesn't pre-exist
              and create """
          err = None
        if not self._faces_dir:
              err = "ERROR: Output faces folder not provided."
          elif not os.path.isdir(self.faces_dir):
              logger.debug("Creating folder: '%s'", self.faces_dir)
              os.makedirs(self.faces_dir)
          elif os.listdir(self.faces_dir):
keep keep keep keep replace keep keep keep keep keep
 lib.alignments: improve re-extraction speed by 500% 
tools/lib_alignments/jobs.py