adjust config.json and directory logic