Put manager in a try...finally statement so that it is sure to end gracefully enough