changed os.rename to shutil.copyfile
changed os.rename to shutil.move