Added network error handling