diff --git a/classes/Importer.php b/classes/Importer.php
index dae575b251d93bf8700407b68fb606dd7aad41ac..99d459344785c404f8bd7b037be4d87e1b8d0224 100644
--- a/classes/Importer.php
+++ b/classes/Importer.php
@@ -53,7 +53,7 @@ final class Importer
         } elseif (isset($_POST['importtext'])) {
             $parser->parse(RDF, $_POST['importtext']);
         } else {
-            HTTPStatus::send500();
+            HTTPStatus::send500('');
         }
 
         $triples = $parser->getTriples();
@@ -154,7 +154,7 @@ final class Importer
         $content .= "?>\n";
 
         try {
-            $fh = fopen(FILE, 'a');
+            $fh = fopen(FILE, 'ab');
             fwrite($fh, $content);
             fclose($fh);
         } catch (Exception $e) {
@@ -235,7 +235,7 @@ final class Importer
                     chdir($path[$i]);
                 }
 
-                $fh = fopen(end($path), 'w');
+                $fh = fopen(end($path), 'wb');
                 fwrite($fh, $v);
                 fclose($fh);
 
@@ -273,7 +273,7 @@ final class Importer
                     chdir($path[$i]);
                 }
 
-                $fh = fopen(end($path), 'w');
+                $fh = fopen(end($path), 'wb');
                 fwrite($fh, $v);
                 fclose($fh);
 
@@ -311,7 +311,7 @@ final class Importer
                     chdir($path[$i]);
                 }
 
-                $fh = fopen(end($path), 'w');
+                $fh = fopen(end($path), 'wb');
                 fwrite($fh, $v);
                 fclose($fh);
 
@@ -376,7 +376,7 @@ final class Importer
     private function showInterface(): void
     {
         echo <<<HTML
-<html>
+<html lang="eng">
   	<head>
         <title>Importing options</title>
   	</head>
@@ -385,7 +385,7 @@ final class Importer
         You can paste the data obtained from another LODSPeaKr instance here in the box.
         You can also automatize this import by adding a parameter '?import=URL' to this page.
         Usually, the URL will be of the for <pre>https://example.com/export</pre>
-        <form action='import' method='post'>
+        <form action='" . $this->basedir . "/import' method='post'>
             <textarea cols='100' rows='25' name='importtext'></textarea>
             <input type='submit' value='Import'/>
         </form>