Moved config io process to main method.