During output, defend against exceptions caused by bad apps