diff --git a/didacto/controller.py b/didacto/controller.py
index d6b9291f33833a95bd711f4c0b95e8414e0e229c..b49d0e52e809647e37958ef6fd4a08c7ba3bea3e 100644
--- a/didacto/controller.py
+++ b/didacto/controller.py
@@ -39,28 +39,7 @@ CONFIG_FOLDER = "config"
 CONFIG_FILE = "preferences.ini"
 
 
-def edit_pdf_keywords(path, keywords):
-    with io.open(path, 'rb') as file_in:
-        reader = PdfFileReader(file_in)
-        writer = PdfFileWriter()
-
-        metadata_in = reader.getDocumentInfo()
-        metadata_out = {}
-        for key in metadata_in:
-            metadata_out[key] = metadata_in[key]
-        if '/AAPL:Keywords' in metadata_out:
-            metadata_out.pop('/AAPL:Keywords')  # this fixes some bug with sibelius6 - MacOs pdf
-        print(metadata_out)
-        print(type(metadata_out))
-
-        writer.appendPagesFromReader(reader)
-        writer.addMetadata(metadata_out)
-        writer.addMetadata({
-            '/Keywords': keywords
-        })
-
-        with io.open(path, 'ab') as file_out:  # ab is append binary; if you do wb, the file will append blank pages
-            writer.write(file_out)
+
 
 
 def create_default_file_struct(home_dir):
@@ -188,10 +167,11 @@ class Controller:
     def run_file(self, path):
         """system call open file."""
         if not os.path.exists(path):
-            raise IOError('No such file: %s' % path)
-
-        if hasattr(os, 'access') and not os.access(path, os.R_OK):
-            raise IOError('Cannot access file: %s' % path)
+            raise OSError
+        # ('No such file: %s' % path) TODO replace error message by tkinter.messagebox.showwarning
+        #
+        # if hasattr(os, 'access') and not os.access(path, os.R_OK):
+        #     raise IOError('Cannot access file: %s' % path)
 
         # os dependant open function
 
@@ -212,3 +192,27 @@ class Controller:
                 "Your `%s` isn't a supported operating system`." % sys.platform)
 
         return proc
+
+    @staticmethod
+    def edit_pdf_keywords(path, keywords):
+        with io.open(path, 'rb') as file_in:
+            reader = PdfFileReader(file_in)
+            writer = PdfFileWriter()
+
+            metadata_in = reader.getDocumentInfo()
+            metadata_out = {}
+            for key in metadata_in:
+                metadata_out[key] = metadata_in[key]
+            if '/AAPL:Keywords' in metadata_out:
+                metadata_out.pop('/AAPL:Keywords')  # this fixes some bug with sibelius6 - MacOs pdf
+            # print(metadata_out)
+            # print(type(metadata_out))
+
+            writer.appendPagesFromReader(reader)
+            writer.addMetadata(metadata_out)
+            writer.addMetadata({
+                '/Keywords': str(keywords)
+            }) # for some reason, keywords string must be converted to string
+
+            with io.open(path, 'ab') as file_out:  # ab is append binary; if you do wb, the file will append blank pages
+                writer.write(file_out)
diff --git a/didacto/view.py b/didacto/view.py
index ca4b5a181ee7f97ad57cc4a4747ab2ed95f514a1..0840958b633433ff848875f8bfbe798704f6bfc6 100644
--- a/didacto/view.py
+++ b/didacto/view.py
@@ -175,7 +175,10 @@ class View(tkinter.Frame):
         else:
             folder = self.tv.item(item)["values"][1]
             path = "/".join((folder, name))
-        self.controller.run_file(path)
+        try:
+            self.controller.run_file(path)
+        except OSError:
+            tkinter.messagebox.showwarning("Error", "File doesn't exist")
 
     def edit_pdf_keywords(self):
         name = self.tv.item(self.popup_item)["values"][0]  # prompts pdf file name
@@ -269,7 +272,7 @@ class View(tkinter.Frame):
         self.tree_repopulate()
         self.keyword_explained.set('')
         if len(self.model.errors_text) > 0:
-            tkinter.messagebox.showwarning("Erreurs", self.model.errors_text)
+            tkinter.messagebox.showwarning("Error", self.model.errors_text)
 
     # fontions de la fenêtre principale
     @staticmethod
@@ -292,7 +295,7 @@ class View(tkinter.Frame):
             self.tree_delete(treeSize)
             self.tree_repopulate()
             if len(self.model.errors_text) > 0:
-                tkinter.messagebox.showerror("Erreurs", self.model.errors_text)
+                tkinter.messagebox.showerror("Error", self.model.errors_text)
 
     # gestion des racourcis clavier
     def select_folder(self, event):
@@ -334,7 +337,12 @@ class View(tkinter.Frame):
                 path = "/".join((tv_path, name))
             if self.checkbox_value.get() is False:
                 path = "/".join((self.corpora_path.get(), name))
-            self.controller.run_file(path)
+            try:
+                self.controller.run_file(path)
+            except OSError:
+                tkinter.messagebox.showerror("Error", "File doesn't exit.")
+
+
         else:
             key = self.tv.item(item)['text']  #############
             self.curent_keyword = key
@@ -357,7 +365,10 @@ class View(tkinter.Frame):
         else:
             folder = self.tv.item(item)["values"][1]
             path = "/".join((folder, name))
-        self.controller.run_file(path)
+        try:
+            self.controller.run_file(path)
+        except OSError:
+            tkinter.messagebox.showerror("Error", "File doesn't exist.")
 
     @staticmethod
     def open_readthedocs():