Closing client on exception