Improve upload script