Added better error handling. executeQuery now throws an IOException if the server responds with something else than a 200.