Writing config before initializing db

That way, the initialize uses the config in the config file