log when process terminated