Adding try catch into beforePhase, making try catch in afterPhase fall back to printing to console