refactor FileUtil.out() to use atomic file move