code: def on_exists(fname):
      # type: (str) -> None
      
  
      if os.path.isfile(fname):
          newfile = fname + ".old"
          print("{} -> {}".format(fname, newfile))
          os.rename(fname, newfile)
docs: Callback example when we try to overwrite an existing screenshot.