handle config.json correctly