Terror plot averted