Update index.js

Clean after upload error