Fixed mem dealloc test and added new logging feature
merged