Add test and fix logic to locate previous config
18 files changed