Changes to client to improve error logging