diff --git a/csv_importer.routing.yml b/csv_importer.routing.yml
index afaae46..d960838 100644
--- a/csv_importer.routing.yml
+++ b/csv_importer.routing.yml
@@ -4,4 +4,4 @@ csv_importer.form:
     _form: '\Drupal\csv_importer\Form\ImporterForm'
     _title: 'Import CSV'
   requirements:
-    _permission: 'administer site configuration'
\ No newline at end of file
+    _permission: 'administer site configuration'
diff --git a/csv_importer.services.yml b/csv_importer.services.yml
index f5f8a89..7699872 100644
--- a/csv_importer.services.yml
+++ b/csv_importer.services.yml
@@ -4,3 +4,4 @@ services:
     parent: default_plugin_manager
   csv_importer.parser:
     class: Drupal\csv_importer\Parser
+    arguments: ['@entity_type.manager']
diff --git a/src/Form/ImporterForm.php b/src/Form/ImporterForm.php
index 3af31a6..a9f18af 100644
--- a/src/Form/ImporterForm.php
+++ b/src/Form/ImporterForm.php
@@ -11,7 +11,6 @@ use Drupal\Core\Render\RendererInterface;
 use Drupal\csv_importer\ParserInterface;
 use Drupal\csv_importer\Plugin\ImporterManager;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Render\Element\MachineName;
 
 /**
  * Provides CSV importer form.
diff --git a/src/Parser.php b/src/Parser.php
index 9023403..7de30a4 100644
--- a/src/Parser.php
+++ b/src/Parser.php
@@ -3,6 +3,7 @@
 namespace Drupal\csv_importer;
 
 use Drupal\file\Entity\File;
+use Drupal\Core\Entity\EntityTypeManager;
 
 /**
  * Parser manager.
@@ -10,6 +11,23 @@ use Drupal\file\Entity\File;
 class Parser implements ParserInterface {
 
   /**
+   * Drupal Entity type manager.
+   *
+   * @var Drupal\Core\Entity\EntityTypeManager
+   */
+  protected $entityTypeManager;
+
+  /**
+   * Constructor for the class Parser.
+   *
+   * @param Drupal\Core\Entity\EntityTypeManager $entity_type_manager
+   *   Instance of entity type manager.
+   */
+  public function __construct(EntityTypeManager $entity_type_manager) {
+    $this->entityTypeManager = $entity_type_manager;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function getCsvById(int $id) {
@@ -41,7 +59,7 @@ class Parser implements ParserInterface {
    */
   public function getCsvEntity(int $id) {
     if ($id) {
-      return File::load($id);
+      return $this->entityTypeManager->getStorage('file')->load($id);
     }
 
     return NULL;
diff --git a/src/Plugin/ImporterBase.php b/src/Plugin/ImporterBase.php
index 48cdf0b..a89f314 100644
--- a/src/Plugin/ImporterBase.php
+++ b/src/Plugin/ImporterBase.php
@@ -115,8 +115,9 @@ abstract class ImporterBase extends PluginBase implements ImporterInterface {
 
     try {
       $added = $entity->save();
-    } 
-    catch (\Exception $e) {}
+    }
+    catch (\Exception $e) {
+    }
 
     if ($added) {
       $context['results'][] = $entity;
diff --git a/tests/FunctionalJavascript/ImporterTest.php b/tests/FunctionalJavascript/ImporterTest.php
index 966f15d..2e0cc9b 100644
--- a/tests/FunctionalJavascript/ImporterTest.php
+++ b/tests/FunctionalJavascript/ImporterTest.php
@@ -25,7 +25,10 @@ class ImporterTest extends JavascriptTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $account = $this->drupalCreateUser(['administer site configuration', 'administer users', 'access user profiles']);
+    $account = $this->drupalCreateUser(['administer site configuration',
+      'administer users',
+      'access user profiles',
+    ]);
     $this->drupalLogin($account);
 
     Node::create([
@@ -37,7 +40,7 @@ class ImporterTest extends JavascriptTestBase {
     User::create([
       'uid' => 1111,
       'name' => 'John Doe',
-      'roles' => [$this->createAdminRole()], 
+      'roles' => [$this->createAdminRole()],
     ])->save();
 
     Term::create([
@@ -100,7 +103,6 @@ class ImporterTest extends JavascriptTestBase {
    *   Entity type.
    * @param string|null $entity_type_bundle
    *   Entity type bundle.
-   *
    */
   protected function processForm(string $entity_type, string $entity_type_bundle = NULL) {
     $assert = $this->assertSession();
diff --git a/tests/modules/csv_importer_test/csv_importer_test.info.yml b/tests/modules/csv_importer_test/csv_importer_test.info.yml
index 908d860..72f0e08 100644
--- a/tests/modules/csv_importer_test/csv_importer_test.info.yml
+++ b/tests/modules/csv_importer_test/csv_importer_test.info.yml
@@ -4,16 +4,16 @@ description: 'Import content from CSV test.'
 core: '8.x'
 package: CSV
 dependencies:
-  - node
-  - taxonomy
-  - link
-  - path
-  - text
-  - options
-  - datetime
-  - menu_ui
-  - file
-  - editor
-  - filter
+  - drupal:node
+  - drupal:taxonomy
+  - drupal:link
+  - drupal:path
+  - drupal:text
+  - drupal:options
+  - drupal:datetime
+  - drupal:menu_ui
+  - drupal:file
+  - drupal:editor
+  - drupal:filter
 
-hidden: true
\ No newline at end of file
+hidden: true
