local userio = celeste.UserIO

function onBegin()
    setFlag("bgblack")
    coroutine.yield(userio.SaveHandler(true,true))
    while userio.Saving do
        coroutine.yield()
    end
    engine.Instance:Exit()
end