Correctly close session at end of main