Write log when script was killed or terminated.