Added memory tracing