Make network call in another thread. Add more error handling.