fixed bug in upload script when file is moved