  
      if not exists(directory):
          directory = get_folder(directory).path
  
      dir_scanned = list(scandir(directory))
      for x in dir_scanned:
          if any([x.name.lower().endswith(ext) for ext in image_extensions]):
              if x.name in exclude_names:
                  if debug:
                      print("Already processed %s" % x.name)
 
</s> remove                     print ('no alignment found for {}, skipping'.format(os.path.basename(filename)))
 </s> add                     tqdm.write ('no alignment found for {}, skipping'.format(os.path.basename(filename)))
    dir_scanned = sorted(os.scandir(directory), key=lambda x: x.name)
  
      if not exists(directory):
          directory = get_folder(directory).path
  
    dir_scanned = sorted(os.scandir(directory), key=lambda x: x.name)
      for x in dir_scanned:
          if any([x.name.lower().endswith(ext) for ext in image_extensions]):
              if x.name in exclude_names:
                  if debug:
                      print("Already processed %s" % x.name)
keep keep keep keep replace keep keep keep keep keep
 Model backups before saving (#349)

* Sort images properly (to make the frame range parameter meaningfull)

* Add backup mechanism for model weights.

* Replace 'print' call by 'tqdm.write' call. 
lib/utils.py