close session early when doing big jobs