added cleanup for upload