fixed config avoid ops from using in-app defined "avoid" ops

refactored swap dir method