Improved timeout and network error handling.