Improving the client and the sample (logging).