cleanup and upload