Add more error logging to client hooks