Move the initialization directly in the startup phase.

As the rc.xml may not exist when we do the initialization, the setup may fail.