Add guard.
Remove guard and extract source.