Collect cached mem by default
Add logging
fix unit tests