generate main config file (instead of copy)