Move output into postMortem function