Added logger for client side errors.
Added missing code