Merge "More logging and better retry logic." into sc-dev