added client-side logging