added log memory feature
added memory logging feature