refactor diagnostic configuration