Handle any exceptions encountered while writing posts and log them