log message when a thread finishes