Close upload on error