diff --git a/queue_import.module b/queue_import.module
index d8ad2e7..a5a5f7a 100644
--- a/queue_import.module
+++ b/queue_import.module
@@ -4,7 +4,8 @@
  * @file
  * Contains queue_import.module.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\queue_import\Hook\QueueImportHooks;
 use Drupal\Core\Field\FieldConfigInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\field\Entity\FieldConfig;
@@ -69,15 +70,7 @@ function check_Field_Exists($content_type) {
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function queue_import_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    // Main module help for the queue_import module.
-    case 'help.page.queue_import':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('Import content with queue api.') . '</p>';
-      return $output;
-
-    default:
-  }
+  return \Drupal::service(QueueImportHooks::class)->help($route_name, $route_match);
 }
diff --git a/queue_import.services.yml b/queue_import.services.yml
index c36e28d..1a72d43 100644
--- a/queue_import.services.yml
+++ b/queue_import.services.yml
@@ -3,3 +3,7 @@ services:
     class: \Drupal\queue_import\Commands\QueueImportCommands
     tags:
       - { name: drush.command }
+
+  Drupal\queue_import\Hook\QueueImportHooks:
+    class: Drupal\queue_import\Hook\QueueImportHooks
+    autowire: true
diff --git a/src/Controller/QueueImportController.php b/src/Controller/QueueImportController.php
index 2317980..cd522cc 100644
--- a/src/Controller/QueueImportController.php
+++ b/src/Controller/QueueImportController.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\queue_import\Controller;
 
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\File\FileExists;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\node\Entity\Node;
 use Drupal\taxonomy\Entity\Term;
@@ -23,7 +25,7 @@ class QueueImportController extends ControllerBase {
       $file = file_get_contents($uri);
       $filename = basename($uri);
       $file_repository = \Drupal::service('file.repository');
-      $file = $file_repository->writeData($file, "public://$filename", FileSystemInterface::EXISTS_REPLACE);
+      $file = $file_repository->writeData($file, "public://$filename", DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.3.0', fn() => FileExists::Replace, fn() => FileSystemInterface::EXISTS_REPLACE));
       if ($file) {
         $fid = $file->id();
 
diff --git a/src/Form/QueueViewForm.php b/src/Form/QueueViewForm.php
index dacf2fb..d0ce877 100644
--- a/src/Form/QueueViewForm.php
+++ b/src/Form/QueueViewForm.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\queue_import\Form;
 
+use Drupal\Core\Utility\Error;
 use Drupal\Core\Ajax\AjaxResponse;
 use Drupal\Core\Ajax\RedirectCommand;
 use Drupal\Core\Form\FormBase;
@@ -160,7 +161,7 @@ class QueueViewForm extends FormBase {
           break;
         }
         catch (\Exception $e) {
-          watchdog_exception('queue_import', $e);
+          Error::logException(\Drupal::logger('queue_import'), $e);
         }
       }
       $this->messenger->addMessage($this->t("Successfully processed queued items."));
diff --git a/src/Hook/QueueImportHooks.php b/src/Hook/QueueImportHooks.php
new file mode 100644
index 0000000..27dcbe7
--- /dev/null
+++ b/src/Hook/QueueImportHooks.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace Drupal\queue_import\Hook;
+
+use Drupal\Core\Field\FieldConfigInterface;
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for queue_import.
+ */
+class QueueImportHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match)
+    {
+        switch ($route_name) {
+            // Main module help for the queue_import module.
+            case 'help.page.queue_import':
+                $output = '';
+                $output .= '<h3>' . $this->t('About') . '</h3>';
+                $output .= '<p>' . $this->t('Import content with queue api.') . '</p>';
+                return $output;
+            default:
+        }
+    }
+}
