Adding information about pid to various log messages in terminate() function.