added more setter methods to configure s.Close()