diff --git a/paper2remarkable/log.py b/paper2remarkable/log.py
index bae1cbf..3a2fcc5 100644
--- a/paper2remarkable/log.py
+++ b/paper2remarkable/log.py
@@ -38,19 +38,27 @@ class Logger(metaclass=Singleton):
     def disable(self):
         self.enabled = False
 
-    def _log(self, msg, mode):
+    def _log(self, msg, mode, end='\n', add_prefix=True):
         if not self.enabled:
             return
         if not mode in ("info", "warn"):
             raise ValueError("Unknown logging mode: %s" % mode)
         file = sys.stdout if mode == "info" else sys.stderr
-        now = datetime.datetime.now()
-        nowstr = now.strftime("%Y-%m-%d %H:%M:%S")
-        print("%s - %s - %s" % (nowstr, mode.upper(), msg), file=file)
+        if add_prefix:
+            now = datetime.datetime.now()
+            nowstr = now.strftime("%Y-%m-%d %H:%M:%S")
+            prefix = "%s - %s - " % (nowstr, mode.upper())
+        else:
+            prefix = ""
+        print("%s%s" % (prefix, msg), end=end, file=file)
         file.flush()
 
-    def info(self, msg):
-        self._log(msg, "info")
+    def info(self, msg, end='\n'):
+        self._log(msg, "info", end=end)
+
+    def warning(self, msg, end='\n'):
+        self._log(msg, "warn", end=end)
+
+    def append(self, msg, mode, end='\n'):
+        self._log(msg, mode, end=end, add_prefix=False)
 
-    def warning(self, msg):
-        self._log(msg, "warn")
diff --git a/paper2remarkable/providers/arxiv.py b/paper2remarkable/providers/arxiv.py
index 572c2bf..47da448 100644
--- a/paper2remarkable/providers/arxiv.py
+++ b/paper2remarkable/providers/arxiv.py
@@ -65,7 +65,7 @@ class Arxiv(Provider):
 
     def dearxiv(self, input_file):
         """Remove the arXiv timestamp from a pdf"""
-        logger.info("Removing arXiv timestamp")
+        logger.info("Removing arXiv timestamp ... ", end="")
         basename = os.path.splitext(input_file)[0]
 
         uncompress_file = basename + "_uncompress.pdf"
@@ -90,13 +90,13 @@ class Arxiv(Provider):
                     current_obj.append(line)
                     objid = int(line.split(b" ")[0])
                     xref[objid] = char_count
-                elif current_obj and line.startswith(b'endobj'):
+                elif current_obj and line.startswith(b"endobj"):
                     # End the current object. If needed, replace the arXiv
                     # stamp in the block (done only once). Reset current
                     # object.
                     current_obj.append(line)
                     block = b"".join(current_obj)
-                    if not replaced_arXiv:
+                    if not replaced_arXiv and b"arXivStAmP" in block:
                         # remove the text
                         block, n_subs1 = re.subn(
                             b"\(" + DEARXIV_TEXT_REGEX + b"\)Tj",
@@ -148,6 +148,8 @@ class Arxiv(Provider):
         output_file = basename + "_dearxiv.pdf"
         self.compress_pdf(removed_file, output_file)
 
+        logger.append("success" if replaced_arXiv else "failed", "info")
+
         return output_file
 
 
diff --git a/paper2remarkable/utils.py b/paper2remarkable/utils.py
index 38c8735..791e81a 100644
--- a/paper2remarkable/utils.py
+++ b/paper2remarkable/utils.py
@@ -150,7 +150,6 @@ def upload_to_remarkable(filepath, remarkable_dir="/", rmapi_path="rmapi"):
                 )
 
     # Upload the file
-    logger.info("%s put %s %s/" % (rmapi_path, filepath, remarkable_dir))
     status = subprocess.call(
         [rmapi_path, "put", filepath, remarkable_dir + "/"],
         stdout=subprocess.DEVNULL,
@@ -176,16 +175,22 @@ def check_pdftool(pdftk_path, qpdf_path):
     pdftk_path = pdftk_path or "false"
     qpdf_path = qpdf_path or "false"
 
-    status = subprocess.call(
-        [pdftk_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
-    )
+    try:
+        status = subprocess.call(
+            [pdftk_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
+        )
+    except FileNotFoundError:
+        status = 1
     if status == 0:
         return "pdftk"
-    status = subprocess.call(
+    try:
+        status = subprocess.call(
         [qpdf_path, "--help"],
         stdout=subprocess.DEVNULL,
         stderr=subprocess.DEVNULL,
     )
+    except FileNotFoundError:
+        status = 1
     if status == 0:
         return "qpdf"
     raise NoPDFToolError

p2r asking for pdftk instead of using qpdf on ubuntu
I have kubuntu 18.04. When I run the example command 
`p2r -v https://arxiv.org/abs/1811.11242 `. It gives the error 
`[Errno 2] No such file or directory: 'pdftk': 'pdftk'`
diff --git a/tests/test_utils.py b/tests/test_utils.py
new file mode 100644
index 0000000..4c122e0
--- /dev/null
+++ b/tests/test_utils.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import unittest
+
+from paper2remarkable.exceptions import NoPDFToolError
+from paper2remarkable.utils import check_pdftool
+
+
+class TestUtils(unittest.TestCase):
+    def test_check_pdftool(self):
+        # Needs a system with both pdftk and qpdf available
+        self.assertEqual(check_pdftool("pdftk", "qpdf"), "pdftk")
+        self.assertEqual(check_pdftool("pdftk_xyz", "qpdf"), "qpdf")
+        self.assertEqual(check_pdftool("pdftk", "qpdf_xyz"), "pdftk")
+        with self.assertRaises(NoPDFToolError):
+            check_pdftool("pdftk_xyz", "qpdf_xyz")
+
+
+if __name__ == "__main__":
+    unittest.main()

pip install -e .[dev]
parse_log_pytest
pytest
green pytest
apt-get update apt-get install -y pdftk ghostscript poppler-utils qpdf
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
beautifulsoup4==4.13.3
Brotli==1.1.0
certifi==2025.1.31
cffi==1.17.1
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
coverage==7.8.0
cryptography==44.0.2
cssselect==1.3.0
cssselect2==0.8.0
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
fonttools==4.56.0
green==4.0.2
html2text==2024.2.26
idna==3.10
importlib_metadata==8.6.1
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
lxml==5.3.1
Markdown==3.7
packaging @ file:///croot/packaging_1734472117206/work
-e git+https://github.com/GjjvdBurg/paper2remarkable.git@90e97824287c192d3d99cae2981cbd35905cb91d#egg=paper2remarkable
pdfminer.six==20250327
pdfplumber==0.11.6
pillow==11.1.0
pluggy @ file:///croot/pluggy_1733169602837/work
pycparser==2.22
pydyf==0.11.0
PyPDF2==3.0.1
pypdfium2==4.30.1
pyphen==0.17.2
pytest @ file:///croot/pytest_1738938843180/work
readability-lxml==0.8.1
regex==2024.11.6
requests==2.32.3
soupsieve==2.6
tinycss2==1.4.0
tinyhtml5==2.0.0
titlecase==2.4.1
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions==4.13.0
Unidecode==1.3.8
urllib3==2.3.0
weasyprint==65.0
webencodings==0.5.1
zipp==3.21.0
zopfli==0.2.3.post1

name: paper2remarkable
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
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_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
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=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
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - beautifulsoup4==4.13.3
      - brotli==1.1.0
      - certifi==2025.1.31
      - cffi==1.17.1
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - coverage==7.8.0
      - cryptography==44.0.2
      - cssselect==1.3.0
      - cssselect2==0.8.0
      - fonttools==4.56.0
      - green==4.0.2
      - html2text==2024.2.26
      - idna==3.10
      - importlib-metadata==8.6.1
      - lxml==5.3.1
      - markdown==3.7
      - pdfminer-six==20250327
      - pdfplumber==0.11.6
      - pillow==11.1.0
      - pycparser==2.22
      - pydyf==0.11.0
      - pypdf2==3.0.1
      - pypdfium2==4.30.1
      - pyphen==0.17.2
      - readability-lxml==0.8.1
      - regex==2024.11.6
      - requests==2.32.3
      - soupsieve==2.6
      - tinycss2==1.4.0
      - tinyhtml5==2.0.0
      - titlecase==2.4.1
      - typing-extensions==4.13.0
      - unidecode==1.3.8
      - urllib3==2.3.0
      - weasyprint==65.0
      - webencodings==0.5.1
      - zipp==3.21.0
      - zopfli==0.2.3.post1
prefix: /opt/conda/envs/paper2remarkable

tests/test_utils.py::TestUtils::test_check_pdftool
paper2remarkable/providers/arxiv.py paper2remarkable/utils.py paper2remarkable/log.py
paper2remarkable/providers/arxiv.py paper2remarkable/utils.py paper2remarkable/log.py