Implement broken on-exit code