Added more debug output to upload.