Implement -g, generate config file