generates a config file based on directory layout