saving session obj after writing to it