added more prints to client and free up some memory