changed Variable Name from cmd to cwd and modified the windows rename
commands