move monkeypatch before config ready