diff --git a/dogen/generator.py b/dogen/generator.py
index 0562cd8..415dcb0 100644
--- a/dogen/generator.py
+++ b/dogen/generator.py
@@ -313,9 +313,10 @@ class Generator(object):
                 algorithms.append(supported_algorithm)
 
             try:
-                if os.path.exists(filename) and algorithms:
-                    for algorithm in algorithms:
-                        self.check_sum(filename, source[algorithm], algorithm)
+                if os.path.exists(filename):
+                    if algorithms:
+                        for algorithm in algorithms:
+                            self.check_sum(filename, source[algorithm], algorithm)
                     passed = True
             except Exception as e:
                 self.log.debug(str(e))
@@ -361,7 +362,7 @@ class Generator(object):
         else:
             if hint:
                 self.log.info(hint)
-                self.log.info("Please download the '%s' artifact manually and save it as '%s'" % (artifact, filename))
+            self.log.info("Please download the '%s' artifact manually and save it as '%s'" % (artifact, filename))
             raise Error("Artifact '%s' could not be fetched!" % artifact)
 
     def check_sum(self, filename, checksum, algorithm):

Dogen fails if md5 is not set for 'local' artifacts
Using dogen 2.0. In my image.yaml, if I have the following:

````
sources:
    - artifact: myfile.tar.gz
````

I run dogen mounting `pwd` into /tmp/output inside the dogen container, and put the myfile.tar.gz inside the build/ folder. Dogen is invoked with /tmp/output/build as the destination folder.

I would expect that the local file myfile.tar.gz is added to the resulting image. However, dogen throws an error of not being able to find the artifact. In addition, the helpful hint on where to download it, i.e. "Please download the 'myfile.tar.gz' artifact manually and save it as '/tmp/output/build/myfile.tar.gz' is missing unless I also add the 'hint' field. 

If I do this:

```
sources:
    - artifact: myfile.tar.gz
      md5: <md5sum of myfile.tar.gz>
```

Then dogen is successful creating the Dockerfile. 

I would like to be able to omit the md5 field and still be able to generate the Dockerfile, as this is useful for generating Dockerfiles for locally built artifacts.

A detailed example can be found here: https://pastebin.com/31fqRGUa

diff --git a/tests/test_unit_generate_handle_files.py b/tests/test_unit_generate_handle_files.py
index daf240a..e811ebb 100644
--- a/tests/test_unit_generate_handle_files.py
+++ b/tests/test_unit_generate_handle_files.py
@@ -155,6 +155,17 @@ class TestHandleSources(unittest.TestCase):
         self.assertEquals(str(cm.exception), "Could not download artifact from orignal location, reason: original")
         mock_fetch_file.assert_has_calls([mock.call('http://cache/get?#algorithm#=#hash#', 'target/jboss-eap.zip'), mock.call('http://host.com/jboss-eap.zip', 'target/jboss-eap.zip')])
 
+    @mock.patch('dogen.generator.Generator._fetch_file')
+    def test_fetch_artifact_should_fail_with_nice_message_when_artifact_without_url_is_not_found_locally(self, mock_fetch_file):
+        self.generator.cfg = {'sources': [{'artifact': 'jboss-eap.zip'}]}
+
+        with self.assertRaises(Error) as cm:
+            self.generator.handle_sources()
+
+        self.assertEquals(str(cm.exception), "Artifact 'jboss-eap.zip' could not be fetched!")
+        mock_fetch_file.assert_not_called()
+        self.log.info.assert_any_call("Please download the 'jboss-eap.zip' artifact manually and save it as 'target/jboss-eap.zip'")
+
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_fetch_artifact_should_fetch_file_from_cache(self, mock_fetch_file):
         self.generator.cfg = {'sources': [{'artifact': 'http://host.com/jboss-eap.zip'}]}
@@ -169,7 +180,8 @@ class TestHandleSources(unittest.TestCase):
         mock_fetch_file.assert_called_with('http://cache/get?jboss-eap.zip', 'target/jboss-eap.zip')
 
     @mock.patch('dogen.generator.Generator._fetch_file')
-    def test_fetch_artifact_should_fetch_file(self, mock_fetch_file):
+    @mock.patch('dogen.generator.os.path.exists', return_value=False)
+    def test_fetch_artifact_should_fetch_file(self, mock_path_exists, mock_fetch_file):
         self.generator.cfg = {'sources': [{'artifact': 'http://host.com/jboss-eap.zip'}]}
         self.generator.handle_sources()
         # No checksum provided and computed
@@ -187,3 +199,12 @@ class TestHandleSources(unittest.TestCase):
 
         self.assertEquals(self.generator.cfg['artifacts'], {'jboss-eap.zip': None})
         mock_fetch_file.assert_has_calls([mock.call('http://cache/get?#algorithm#=#hash#', 'target/jboss-eap.zip'), mock.call('http://host.com/jboss-eap.zip', 'target/jboss-eap.zip')])
+
+    @mock.patch('dogen.generator.Generator._fetch_file')
+    @mock.patch('dogen.generator.os.path.exists', return_value=True)
+    def test_fetch_artifact_should_not_fetch_file_if_exists(self, mock_path_exists, mock_fetch_file):
+        self.generator.cfg = {'sources': [{'artifact': 'http://host.com/jboss-eap.zip'}]}
+        self.generator.handle_sources()
+        # No checksum provided and computed
+        self.assertEquals(self.generator.cfg['artifacts'], {'jboss-eap.zip': None})
+        mock_fetch_file.assert_not_called()

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov mock
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi==2025.1.31
charset-normalizer==3.4.1
colorlog==6.9.0
coverage==7.8.0
docopt==0.6.2
-e git+https://github.com/jboss-dockerfiles/dogen.git@a475173ce00b2d6686c601ffc46a8d2bc3ed0a7f#egg=dogen
exceptiongroup==1.2.2
idna==3.10
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
mock==5.2.0
packaging==24.2
pluggy==1.5.0
pykwalify==1.8.0
pytest==8.3.5
pytest-cov==6.0.0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
six==1.17.0
tomli==2.2.1
urllib3==2.3.0

name: dogen
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
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - 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=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - colorlog==6.9.0
      - coverage==7.8.0
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mock==5.2.0
      - packaging==24.2
      - pluggy==1.5.0
      - pykwalify==1.8.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requests==2.32.3
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.12
      - six==1.17.0
      - tomli==2.2.1
      - urllib3==2.3.0
prefix: /opt/conda/envs/dogen

tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_fail_with_nice_message_when_artifact_without_url_is_not_found_locally tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_not_fetch_file_if_exists
tests/test_unit_generate_handle_files.py::TestURL::test_local_file tests/test_unit_generate_handle_files.py::TestURL::test_remote_http_file tests/test_unit_generate_handle_files.py::TestURL::test_remote_https_file tests/test_unit_generate_handle_files.py::TestFetchFile::test_fetching_with_filename tests/test_unit_generate_handle_files.py::TestFetchFile::test_fetching_with_tmpfile tests/test_unit_generate_handle_files.py::TestCustomTemplateHandling::test_do_not_fail_if_no_template_is_provided tests/test_unit_generate_handle_files.py::TestCustomTemplateHandling::test_fetch_template_success tests/test_unit_generate_handle_files.py::TestCustomTemplateHandling::test_fetch_template_with_error tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_download_from_original_location_if_cached_location_failed tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_fail_when_cached_download_failed_and_original_failed_too tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_fail_when_fetching_fails tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_fetch_file tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_should_fetch_file_from_cache tests/test_unit_generate_handle_files.py::TestHandleSources::test_fetch_artifact_without_url_should_fail
dogen/generator.py
dogen/generator.py