Config generation logic modified