write_graphite plugin: Improved error reporting when connecting to the server.