only run upload if there is a file to upload
take care of file upload errors