program: automatically generating config file