added ability to set encoding for FileUtil.writeUsing