diff --git a/simplelineicons.module b/simplelineicons.module
index abe4f48..12db03a 100644
--- a/simplelineicons.module
+++ b/simplelineicons.module
@@ -1,5 +1,6 @@
 <?php
 
+use Drupal\Core\Form\FormStateInterface;
 /**
  * @file
  * Contains simplelineicons.module.
@@ -67,10 +68,9 @@ function simplelineicons_page_attachments(array &$page) {
     $library = libraries_detect(SIMPLELINEICONS_LIBRARY);
 
     if (!$library['installed']) {
-      drupal_set_message($library['error message'] . ' ' . t('Please make sure that '
+      \Drupal::messenger()->addWarning($library['error message'] . ' ' . t('Please make sure that '
           . SIMPLELINEICONS_NAME . ' was download & extracted at /libraries/' . SIMPLELINEICONS_LIBRARY . ' directory. '
-          . 'Please check README.txt for more details.'),
-        'warning');
+          . 'Please check README.txt for more details.'));
     }
     else {
       $page['#attached']['library'][] = 'simplelineicons/' . SIMPLELINEICONS_LIBRARY;
@@ -84,7 +84,7 @@ function simplelineicons_page_attachments(array &$page) {
  * Add a checkbox to Drupal Bandwidth optimization settings in performance page
  * to provide an option to load CDN version of simplelineicons.
  */
-function simplelineicons_form_system_performance_settings_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
+function simplelineicons_form_system_performance_settings_alter(&$form, FormStateInterface $form_state, $form_id) {
   $form['bandwidth_optimization']['simplelineicons_use_cdn'] = [
     '#type'          => 'checkbox',
     '#title'         => t('Use CDN version of Simple Line Icons.'),
