fixed upload error resulting from os.popen