Added close session option