Add error hook to statsd plugin