Better error handling with network.