Add close guard.