removed unnecessary variable and removed duplicate function definition
for uploadnewScript