fix bug in FileUtil.copyFileCore()