add and use local_config. use config in index.py