diff --git a/CHANGELOG.md b/CHANGELOG.md
index 64cf9a6..4c45890 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,14 @@
 - You can now specify custom log format and log level in `dakara_base.config.create_logger` with arguments `custom_log_format` and `custom_log_level`.
 - Access to and create user-level stored Dakara config files with `dakara_base.config.get_config_file` and `dakara_base.config.create_config_file`.
 
+### Changed
+
+- `progress_bar`: the progress bar now displays percentage.
+
+### Fixed
+
+- `progress_bar`: When an exception was raised within a progress bar, it would prevent to stop the capture of stderr, leading to hide any further log entry.
+
 ## 1.1.0 - 2019-09-16
 
 ### Added
diff --git a/src/dakara_base/progress_bar.py b/src/dakara_base/progress_bar.py
index 178f716..dddb71f 100644
--- a/src/dakara_base/progress_bar.py
+++ b/src/dakara_base/progress_bar.py
@@ -66,16 +66,18 @@ class ShrinkableTextWidget(WidgetBase):
         return text.ljust(width)
 
 
-def progress_bar(*args, text=None, **kwargs):
-    """Gives the default un-muted progress bar for the project
+def progress_bar(iterator, *args, text=None, **kwargs):
+    """Generator that gives the default un-muted progress bar for the project
 
-    It prints an optionnal shrinkable text, a timer, a progress bar and an ETA.
+    It prints an optionnal shrinkable text (if a text is provided), a
+    percentage progress, a progress bar and an adaptative ETA.
 
     Args:
+        iterator (iterator): iterator of items to use the bar with.
         text (str): text to display describing the current operation.
 
     Returns:
-        generator: progress bar.
+        generator object: item handled by the progress bar.
     """
     widgets = []
 
@@ -84,27 +86,41 @@ def progress_bar(*args, text=None, **kwargs):
         widgets.extend([ShrinkableTextWidget(text), " "])
 
     # add other widgets
-    widgets.extend([progressbar.Timer(), progressbar.Bar(), progressbar.ETA()])
+    widgets.extend(
+        [
+            progressbar.Percentage(),
+            " ",
+            progressbar.Bar(),
+            " ",
+            progressbar.Timer(),
+            " ",
+            progressbar.AdaptiveETA(),
+        ]
+    )
 
     # create progress bar
-    return progressbar.progressbar(*args, widgets=widgets, **kwargs)
+    with progressbar.ProgressBar(*args, widgets=widgets, **kwargs) as progress:
+        for item in progress(iterator):
+            yield item
 
 
-def null_bar(*args, text=None, **kwargs):
-    """Gives the defaylt muted progress bar for the project
+def null_bar(iterator, *args, text=None, **kwargs):
+    """Generator that gives the defaylt muted progress bar for the project
 
     It only logs the optionnal text.
 
     Args:
+        iterator (iterator): iterator of items to use the bar with.
         text (str): text to log describing the current operation.
 
     Returns:
-        progressbar.bar.NullBar: null progress bar that does not do anything.
+        generator object: item handled by the progress bar.
     """
     # log text immediately
     if text:
         logger.info(text)
 
     # create null progress bar
-    bar = progressbar.NullBar()
-    return bar(*args, **kwargs)
+    with progressbar.NullBar(*args, **kwargs) as progress:
+        for item in progress(iterator):
+            yield item

Unknown exceptions are not displayed when progress bar is used
It looks like when an unknown exception is caught, the stderr wrapper is still active and the logs are hidden.
diff --git a/tests/test_progress_bar.py b/tests/test_progress_bar.py
index 3d1acee..3e8d032 100644
--- a/tests/test_progress_bar.py
+++ b/tests/test_progress_bar.py
@@ -1,7 +1,11 @@
 import logging
+import sys
+from contextlib import contextmanager
 from io import StringIO
 from unittest import TestCase
-from unittest.mock import MagicMock
+from unittest.mock import MagicMock, patch
+
+import progressbar
 
 from dakara_base import progress_bar
 
@@ -85,12 +89,13 @@ class ProgressBarTestCase(TestCase):
             lines = self.get_lines(file)
 
         # assert the lines
-        self.assertEqual(len(lines), 2)
+        self.assertEqual(len(lines), 3)
         self.assertEqual(
             lines,
             [
-                "some text here   Elapsed Time: 0:00:00|           |ETA:  --:--:--",
-                "some text here   Elapsed Time: 0:00:00|###########|Time:  0:00:00",
+                "some text here   N/A% |    | Elapsed Time: 0:00:00 ETA:  --:--:--",
+                "some text here   100% |####| Elapsed Time: 0:00:00 Time:  0:00:00",
+                "some text here   100% |####| Elapsed Time: 0:00:00 Time:  0:00:00",
             ],
         )
 
@@ -105,15 +110,109 @@ class ProgressBarTestCase(TestCase):
             lines = self.get_lines(file)
 
         # assert the lines
-        self.assertEqual(len(lines), 2)
+        self.assertEqual(len(lines), 3)
         self.assertEqual(
             lines,
             [
-                "Elapsed Time: 0:00:00|                            |ETA:  --:--:--",
-                "Elapsed Time: 0:00:00|############################|Time:  0:00:00",
+                "N/A% |                     | Elapsed Time: 0:00:00 ETA:  --:--:--",
+                "100% |#####################| Elapsed Time: 0:00:00 Time:  0:00:00",
+                "100% |#####################| Elapsed Time: 0:00:00 Time:  0:00:00",
             ],
         )
 
+    def test_stderr_on_no_exception(self):
+        """Test to check stderr is not captured if no exceptions occur
+        """
+        stderr = StringIO()
+        initial_stderr = sys.stderr
+
+        # we patch `sys.stderr` as it is risky to work directly on it, and we
+        # patch `progressbar.streams.original_stderr` as it is defined at
+        # module loading
+        with patch("sys.stderr", stderr), patch(
+            "progressbar.streams.original_stderr", stderr
+        ), wrap_stderr_progressbar():
+            wrapped_stderr = sys.stderr
+
+            # execute the progressbar without exception
+            with StringIO() as file:
+                for _ in progress_bar.progress_bar(range(1), fd=file, term_width=65):
+                    pass
+
+            sys.stderr.write("error")
+            after_stderr = sys.stderr
+
+        final_stderr = sys.stderr
+
+        # assert stderrs
+        self.assertIs(initial_stderr, final_stderr)
+        self.assertIs(wrapped_stderr, after_stderr)
+        self.assertIsNot(initial_stderr, wrapped_stderr)
+        self.assertIsNot(stderr, wrapped_stderr)
+        self.assertIsNot(stderr, initial_stderr)
+
+        # assert stderr value
+        value = stderr.getvalue()
+        self.assertEqual(value, "error")
+
+    def test_no_stderr_on_exception(self):
+        """Test to check stderr does not remain captured after an exception
+
+        When leaving a progress bar by an exception, it does not call
+        `progressbar.streams.stop_capturing` and the stderr is allways
+        captured.
+        """
+
+        class MyException(Exception):
+            pass
+
+        stderr = StringIO()
+        initial_stderr = sys.stderr
+
+        with patch("sys.stderr", stderr), patch(
+            "progressbar.streams.original_stderr", stderr
+        ), wrap_stderr_progressbar():
+            wrapped_stderr = sys.stderr
+
+            # execute the progressbar with an exception
+            with StringIO() as file:
+                try:
+                    for _ in progress_bar.progress_bar(
+                        range(1), fd=file, term_width=65
+                    ):
+                        raise MyException("error")
+
+                except MyException:
+                    pass
+
+            sys.stderr.write("error")
+            after_stderr = sys.stderr
+
+        final_stderr = sys.stderr
+
+        # assert stderrs
+        self.assertIs(initial_stderr, final_stderr)
+        self.assertIs(wrapped_stderr, after_stderr)
+        self.assertIsNot(initial_stderr, wrapped_stderr)
+        self.assertIsNot(stderr, wrapped_stderr)
+        self.assertIsNot(stderr, initial_stderr)
+
+        # assert stderr value
+        value = stderr.getvalue()
+        self.assertEqual(value, "error")
+
+
+@contextmanager
+def wrap_stderr_progressbar():
+    """Temporary wrap stderr with progressbar tools
+    """
+    try:
+        progressbar.streams.wrap_stderr()
+        yield None
+
+    finally:
+        progressbar.streams.unwrap_stderr()
+
 
 class NullBarTestCase(TestCase):
     """Test the null progress bar

pip install -e .[tests]
parse_log_pytest
pytest
pytest
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
black==22.8.0
certifi==2021.5.30
chardet==3.0.4
click==8.0.4
codecov==2.1.13
coloredlogs==10.0
coverage==6.2
-e git+https://github.com/DakaraProject/dakara-base.git@6de07604ea982d516dfd0234495bef9fad2cd824#egg=dakarabase
dataclasses==0.8
flake8==5.0.4
furl==2.0.0
humanfriendly==10.0
idna==2.8
importlib-metadata==4.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
mccabe==0.7.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
mypy-extensions==1.0.0
orderedmultidict==1.0.1
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
path.py==12.0.2
pathspec==0.9.0
platformdirs==2.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
progressbar2==3.43.1
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
python-utils==3.5.2
PyYAML==5.1.2
requests==2.22.0
six==1.17.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
typed-ast==1.5.5
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
urllib3==1.25.11
websocket-client==0.56.0
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: dakara-base
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
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_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
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - 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
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - black==22.8.0
      - chardet==3.0.4
      - click==8.0.4
      - codecov==2.1.13
      - coloredlogs==10.0
      - coverage==6.2
      - dataclasses==0.8
      - flake8==5.0.4
      - furl==2.0.0
      - humanfriendly==10.0
      - idna==2.8
      - importlib-metadata==4.2.0
      - mccabe==0.7.0
      - mypy-extensions==1.0.0
      - orderedmultidict==1.0.1
      - path-py==12.0.2
      - pathspec==0.9.0
      - platformdirs==2.4.0
      - progressbar2==3.43.1
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - python-utils==3.5.2
      - pyyaml==5.1.2
      - requests==2.22.0
      - six==1.17.0
      - tomli==1.2.3
      - typed-ast==1.5.5
      - urllib3==1.25.11
      - websocket-client==0.56.0
prefix: /opt/conda/envs/dakara-base

tests/test_progress_bar.py::ProgressBarTestCase::test_no_stderr_on_exception tests/test_progress_bar.py::ProgressBarTestCase::test_no_text tests/test_progress_bar.py::ProgressBarTestCase::test_stderr_on_no_exception tests/test_progress_bar.py::ProgressBarTestCase::test_text
tests/test_progress_bar.py::ShrinkablaTextWidgetTestCase::test_no_shrink tests/test_progress_bar.py::ShrinkablaTextWidgetTestCase::test_shrink tests/test_progress_bar.py::ShrinkablaTextWidgetTestCase::test_too_short tests/test_progress_bar.py::NullBarTestCase::test_no_text tests/test_progress_bar.py::NullBarTestCase::test_text
src/dakara_base/progress_bar.py CHANGELOG.md
src/dakara_base/progress_bar.py CHANGELOG.md