fix wirte file but error occurred at URL with space