fix file upload script