refine osx config script