implement logger callback
a
fix double free
add few messages