diff --git a/dumpers/loopit_krumo/loopit_krumo.module b/dumpers/loopit_krumo/loopit_krumo.module
index e9ab061..1321bd5 100644
--- a/dumpers/loopit_krumo/loopit_krumo.module
+++ b/dumpers/loopit_krumo/loopit_krumo.module
@@ -7,4 +7,4 @@ function loopit_krumo_page_attachments_alter(&$page) {
   if (\Drupal::currentUser()->hasPermission('access devel information')) {
     $page['#attached']['library'][] = 'loopit_krumo/krumo_search';
   }
-}
\ No newline at end of file
+}
diff --git a/loopit.drush.inc b/loopit.drush.inc
index 59b26af..fc734cc 100644
--- a/loopit.drush.inc
+++ b/loopit.drush.inc
@@ -1,5 +1,6 @@
 <?php
 
+use Drupal\Core\File\FileSystemInterface;
 use Drupal\loopit\Aggregate\AggregateEntity;
 use Drupal\loopit\Aggregate\AggregatePlugin;
 use Drupal\loopit\Aggregate\AggregateService;
@@ -178,8 +179,8 @@ function drush_loopit_method_overrides() {
     // Delete old files (init) for $dirname1
     if(!isset($dirnames[$dirname1])) {
       //rmdir($dirname1);
-      file_prepare_directory($dirname1, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
-      foreach(glob(drupal_realpath($dirname1) . '/*') as $todelete) {
+      \Drupal::service('file_system')->prepareDirectory($dirname1, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
+      foreach(glob(\Drupal::service('file_system')->realpath($dirname1) . '/*') as $todelete) {
         if (!is_dir($todelete)) {
           unlink($todelete);
         }
@@ -192,8 +193,8 @@ function drush_loopit_method_overrides() {
     // Delete old files (init) for $dirname2
     if(!isset($dirnames[$dirname2])) {
       //rmdir($dirname2);
-      file_prepare_directory($dirname2, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
-      foreach(glob(drupal_realpath($dirname2) . '/*') as $todelete) {
+      \Drupal::service('file_system')->prepareDirectory($dirname2, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
+      foreach(glob(\Drupal::service('file_system')->realpath($dirname2) . '/*') as $todelete) {
         if (!is_dir($todelete)) {
           unlink($todelete);
         }
@@ -212,4 +213,4 @@ function drush_loopit_method_overrides() {
 
   $public_files = \Drupal::service('file_system')->realpath('public://');
   drush_log('meld ' . $public_files . '/method_override/ ' . $public_files . '/method_parent/', 'notice');
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregateArray.php b/src/Aggregate/AggregateArray.php
index f23220a..11aec81 100644
--- a/src/Aggregate/AggregateArray.php
+++ b/src/Aggregate/AggregateArray.php
@@ -493,4 +493,4 @@ class AggregateArray implements AggregateInterface {
     return $output;
   }
 
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregateEntity.php b/src/Aggregate/AggregateEntity.php
index dd8e88c..eda730f 100644
--- a/src/Aggregate/AggregateEntity.php
+++ b/src/Aggregate/AggregateEntity.php
@@ -103,4 +103,4 @@ class AggregateEntity extends AggregateArray {
 
     return $current;
   }
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregateFilter.php b/src/Aggregate/AggregateFilter.php
index e96750b..f9fbb8f 100644
--- a/src/Aggregate/AggregateFilter.php
+++ b/src/Aggregate/AggregateFilter.php
@@ -248,4 +248,4 @@ class AggregateFilter {
     }
     return $current;
   }
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregateInterface.php b/src/Aggregate/AggregateInterface.php
index 676606c..34bd375 100644
--- a/src/Aggregate/AggregateInterface.php
+++ b/src/Aggregate/AggregateInterface.php
@@ -20,4 +20,4 @@ interface AggregateInterface extends \IteratorAggregate, \ArrayAccess {
   public function onCurrent($current, $index);
   public function onLeaf($current, $index);
 
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregateObject.php b/src/Aggregate/AggregateObject.php
index fe13b77..100e33e 100644
--- a/src/Aggregate/AggregateObject.php
+++ b/src/Aggregate/AggregateObject.php
@@ -83,4 +83,4 @@ class AggregateObject extends AggregateArray {
     $output = $aggreg->traverseFast();
     return $output;
   }
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregatePlugin.php b/src/Aggregate/AggregatePlugin.php
index 3035d8e..4300b3e 100644
--- a/src/Aggregate/AggregatePlugin.php
+++ b/src/Aggregate/AggregatePlugin.php
@@ -354,4 +354,4 @@ class AggregatePlugin extends AggregateArray {
 
     return $current;
   }
-}
\ No newline at end of file
+}
diff --git a/src/Aggregate/AggregateService.php b/src/Aggregate/AggregateService.php
index 739da0a..32c16d6 100644
--- a/src/Aggregate/AggregateService.php
+++ b/src/Aggregate/AggregateService.php
@@ -267,4 +267,4 @@ class AggregateService extends AggregateArray {
   }
 
 
-}
\ No newline at end of file
+}
diff --git a/src/Controller/LoopitServiceController.php b/src/Controller/LoopitServiceController.php
index c819d5c..f55cbb5 100644
--- a/src/Controller/LoopitServiceController.php
+++ b/src/Controller/LoopitServiceController.php
@@ -57,4 +57,4 @@ class LoopitServiceController extends ContainerInfoController {
 
     return $output;
   }
-}
\ No newline at end of file
+}
diff --git a/src/Iterator/AggregateIteratorInterface.php b/src/Iterator/AggregateIteratorInterface.php
index ff8920c..78e85be 100644
--- a/src/Iterator/AggregateIteratorInterface.php
+++ b/src/Iterator/AggregateIteratorInterface.php
@@ -10,4 +10,4 @@ use Drupal\loopit\Aggregate\AggregateInterface;
 interface AggregateIteratorInterface extends \RecursiveIterator {
 
   public function setAggregate(AggregateInterface $aggregate);
-}
\ No newline at end of file
+}
diff --git a/src/Iterator/AggregateIteratorTrait.php b/src/Iterator/AggregateIteratorTrait.php
index 0bf27e3..220e51e 100644
--- a/src/Iterator/AggregateIteratorTrait.php
+++ b/src/Iterator/AggregateIteratorTrait.php
@@ -73,4 +73,4 @@ trait AggregateIteratorTrait {
 
     return $has_children;
   }
-}
\ No newline at end of file
+}
diff --git a/src/Routing/RouteSubscriber.php b/src/Routing/RouteSubscriber.php
index aabcd6b..3ff7bcd 100644
--- a/src/Routing/RouteSubscriber.php
+++ b/src/Routing/RouteSubscriber.php
@@ -20,4 +20,4 @@ class RouteSubscriber extends RouteSubscriberBase {
     }
 
   }
-}
\ No newline at end of file
+}
