Mark close and terminate as side-effecting