Fixed data access after free.

Added statistics + monitoring print