implement logger callback
fix double free
add few messages