changed log message
fix memory leak