add local config and switch to last window