Add statements to log unexpected errors when managing a post