Log messages before freeing data
Merge pull request #3 from demellj/master

Log messages before freeing data