logging memory in pywind
some changes