diff --git a/ncbi_genome_download/core.py b/ncbi_genome_download/core.py
index 2a47d97..f2389df 100644
--- a/ncbi_genome_download/core.py
+++ b/ncbi_genome_download/core.py
@@ -286,6 +286,8 @@ def save_and_check(response, local_file, expected_checksum, symlink_path):
         return False
 
     if symlink_path is not None:
+        if os.path.lexists(symlink_path):
+            os.unlink(symlink_path)
         os.symlink(os.path.abspath(local_file), symlink_path)
 
     return True

OSError: [Errno 17] File exists
Been getting this a bit when I restart jobs that failed due to unreachable network:

```
NFO: Starting new HTTPS connection (1): ftp.ncbi.nlm.nih.gov
DEBUG: "GET /genomes/all/GCA_001443705.1_ASM144370v1/GCA_001443705.1_ASM144370v1_genomic.gbff.gz HTTP/1.1" 200 185238057
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/ncbi-genome-download", line 11, in <module>
    sys.exit(main())
  File "/home/linuxbrew/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/site-packages/ncbi_genome_download/__main__.py", line 78, in main
INFO: Starting new HTTPS connection (1): ftp.ncbi.nlm.nih.gov
    ret = ncbi_genome_download.download(args)
  File "/home/linuxbrew/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/site-packages/ncbi_genome_download/core.py", line 60, in download
    args.taxid, args.human_readable, args.parallel)
  File "/home/linuxbrew/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/site-packages/ncbi_genome_download/core.py", line 94, in _download
    pool.map(worker, download_jobs)
  File "/home/linuxbrew/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/home/linuxbrew/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
OSError: [Errno 17] File exists
```

diff --git a/tests/test_core.py b/tests/test_core.py
index d372c91..3c17e9a 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1,3 +1,4 @@
+import os
 import pytest
 import requests_mock
 from argparse import Namespace
@@ -508,6 +509,21 @@ def test_download_file_symlink_path(req, tmpdir):
     symlink = symlink_dir.join('fake_genomic.gbff.gz')
     assert symlink.check()
 
+def test_download_file_symlink_path_existed(req, tmpdir):
+    entry = {'ftp_path': 'ftp://fake/path'}
+    fake_file = tmpdir.join('fake_genomic.gbff.gz')
+    fake_file.write('foo')
+    assert fake_file.check()
+    checksum = core.md5sum(str(fake_file))
+    checksums = [{'checksum': checksum, 'file': fake_file.basename}]
+    dl_dir = tmpdir.mkdir('download')
+    symlink_dir = tmpdir.mkdir('symlink')
+    symlink = symlink_dir.join('fake_genomic.gbff.gz')
+    os.symlink("/foo/bar", str(symlink))
+    req.get('https://fake/path/fake_genomic.gbff.gz', text=fake_file.read())
+
+    assert core.worker(core.download_file(entry, str(dl_dir), checksums, symlink_path=str(symlink_dir)))
+    assert symlink.check()
 
 def test_get_genus_label():
     fake_entry = {'organism_name': 'Example species ABC 1234'}

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest coverage pytest-cov requests-mock pytest-mock
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
-e git+https://github.com/kblin/ncbi-genome-download.git@07b61f5086322e87b4412480e2bd99bdadc57421#egg=ncbi_genome_download
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytest-mock==3.6.1
requests==2.27.1
requests-mock==1.12.1
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: ncbi-genome-download
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - coverage==6.2
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - requests==2.27.1
      - requests-mock==1.12.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/ncbi-genome-download

tests/test_core.py::test_download_file_symlink_path_existed
tests/test_core.py::test_download_one tests/test_core.py::test_download_all tests/test_core.py::test_download_connection_err tests/test_core.py::test__download tests/test_core.py::test__download_complete tests/test_core.py::test__download_chromosome tests/test_core.py::test__download_scaffold tests/test_core.py::test__download_contig tests/test_core.py::test__download_genus tests/test_core.py::test__download_genus_lowercase tests/test_core.py::test__download_taxid tests/test_core.py::test__download_species_taxid tests/test_core.py::test_get_summary tests/test_core.py::test_parse_summary tests/test_core.py::test_download_entry_genbank tests/test_core.py::test_download_entry_all tests/test_core.py::test_download_entry_missing tests/test_core.py::test_download_entry_human_readable tests/test_core.py::test_create_dir tests/test_core.py::test_create_dir_exists tests/test_core.py::test_create_dir_isfile tests/test_core.py::test_create_readable_dir tests/test_core.py::test_create_readable_dir_exists tests/test_core.py::test_create_readable_dir_isfile tests/test_core.py::test_create_readable_dir_virus tests/test_core.py::test_grab_checksums_file tests/test_core.py::test_parse_checksums tests/test_core.py::test_has_file_changed_no_file tests/test_core.py::test_has_file_changed tests/test_core.py::test_has_file_changed_unchanged tests/test_core.py::test_md5sum tests/test_core.py::test_download_file_genbank tests/test_core.py::test_download_file_genbank_mismatch tests/test_core.py::test_download_file_fasta tests/test_core.py::test_download_file_cds_fasta tests/test_core.py::test_download_file_rna_fasta tests/test_core.py::test_download_file_symlink_path tests/test_core.py::test_get_genus_label tests/test_core.py::test_get_species_label tests/test_core.py::test_get_strain_label
ncbi_genome_download/core.py
ncbi_genome_download/core.py