logging on termination