Enhance session speed by closing session for write operations after all writes are done #26