Added more retries and debugging.