More error handling/retrying logic