diff --git a/composer.json b/composer.json
index fa8596b..c99e214 100644
--- a/composer.json
+++ b/composer.json
@@ -5,8 +5,7 @@
     "require": {
         "php": ">=7.1",
         "dflydev/dot-access-data": "^1.1",
-        "symfony/filesystem": "^3.3"
-
+        "symfony/config": "^3.3"
     },
     "autoload": {
       "psr-4": {
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 2ec6f6e..adbb34d 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -5,7 +5,9 @@
 <phpunit  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
          backupGlobals="false"
-
+         convertErrorsToExceptions="true"
+         convertWarningsToExceptions="true"
+          failOnWarning="false"
          colors="true"
          bootstrap="vendor/autoload.php"
 >
diff --git a/src/Sikofitt/Config/DotConfig.php b/src/Sikofitt/Config/DotConfig.php
index bf5eae0..b186cd9 100644
--- a/src/Sikofitt/Config/DotConfig.php
+++ b/src/Sikofitt/Config/DotConfig.php
@@ -25,12 +25,14 @@ use Sikofitt\Config\Loader\JsonFileLoader;
 use Sikofitt\Config\Loader\NeonFileLoader;
 use Sikofitt\Config\Loader\PhpFileLoader;
 use Sikofitt\Config\Loader\YamlFileLoader;
+use Symfony\Component\Config\Exception\FileLoaderLoadException;
 use Symfony\Component\Config\FileLocator;
 use Symfony\Component\Config\Loader\DelegatingLoader;
 use Symfony\Component\Config\Loader\GlobFileLoader;
 use Symfony\Component\Config\Loader\LoaderResolver;
 use Symfony\Component\Filesystem\Exception\FileNotFoundException;
 use Symfony\Component\Yaml\Yaml;
+use Webmozart\Json\JsonDecoder;
 
 /**
  * Class Configuration
@@ -56,6 +58,7 @@ class DotConfig
         $this->arrayConfig = [];
 
         $locator = new FileLocator();
+
         $loaderResolver = new LoaderResolver();
         $loaderResolver->addLoader(new PhpFileLoader($locator));
         $loaderResolver->addLoader(new JsonFileLoader($locator));
@@ -73,6 +76,7 @@ class DotConfig
 
         if (is_array($configResource)) {
             $configResource = $this->loadDirectories($configResource);
+
             $configResource = $this->loadFiles($configResource);
 
             $configResource = array_shift($configResource);
@@ -85,7 +89,11 @@ class DotConfig
             }
         } else {
             if (is_file($configResource)) {
-                $this->arrayConfig = $this->delegateLoader->load($configResource);
+                try {
+                    $this->arrayConfig = $this->delegateLoader->load($configResource);
+                } catch (FileLoaderLoadException $f) {
+                    $this->handleException($f, $configResource);
+                }
             }
         }
 
@@ -288,6 +296,32 @@ class DotConfig
         return $this->config->has($key);
     }
 
+    /**
+     * @param $key
+     * @param $value
+     */
+    public function append($key, $value): void
+    {
+        $this->config->append($key, $value);
+    }
+
+    private function handleException(\Throwable $exception, string $file): void
+    {
+        switch (pathinfo($file, PATHINFO_EXTENSION)) {
+            case 'neon':
+                $message = sprintf('%s.  Perhaps you forgot to require nette/neon?', $exception->getMessage());
+                break;
+            case 'yaml':
+            case 'yml':
+                $message = sprintf('%s. Perhaps you forgot to require symfony/yaml?', $exception->getMessage());
+                break;
+            default:
+                $message = sprintf('%s.', $exception->getMessage());
+        }
+
+        trigger_error($message, E_USER_WARNING);
+    }
+
     /**
      * @param array $directories
      *
@@ -298,14 +332,19 @@ class DotConfig
     {
         foreach ($directories as $key => $config) {
             if (is_string($config) && is_dir($config)) {
-                $this->arrayConfig = array_merge_recursive(
-                    $this->arrayConfig,
-                    $this->delegateLoader->load($config . '/**', 'glob')
-                );
-                unset($directories[$key]);
-                $this->arrayConfig = $this->mergeGlob($this->arrayConfig);
+                try {
+                    $this->arrayConfig = array_merge_recursive(
+                        $this->arrayConfig,
+                        $this->delegateLoader->load($config . '/**', 'glob')
+                    );
+                    unset($directories[$key]);
+                    $this->arrayConfig = $this->mergeGlob($this->arrayConfig);
+                } catch (FileLoaderLoadException $f) {
+                    $this->handleException($f, $config);
+                }
             }
         }
+
         return $directories;
     }
 
@@ -319,8 +358,15 @@ class DotConfig
     {
         foreach ($files as $key => $config) {
             if (is_string($config) && is_file($config)) {
-                $this->arrayConfig = array_merge_recursive($this->arrayConfig, $this->delegateLoader->load($config));
-                unset($files[$key]);
+                try {
+                    $this->arrayConfig = array_merge_recursive(
+                        $this->arrayConfig,
+                        $this->delegateLoader->load($config)
+                    );
+                    unset($files[$key]);
+                } catch (FileLoaderLoadException $f) {
+                    $this->handleException($f, $config);
+                }
             }
         }
 
diff --git a/src/Sikofitt/Config/Loader/Exception/JsonDecodingException.php b/src/Sikofitt/Config/Loader/Exception/JsonDecodingException.php
index b20a320..d50ca4d 100644
--- a/src/Sikofitt/Config/Loader/Exception/JsonDecodingException.php
+++ b/src/Sikofitt/Config/Loader/Exception/JsonDecodingException.php
@@ -32,7 +32,7 @@ class JsonDecodingException extends \ErrorException
       $severity = E_RECOVERABLE_ERROR,
       $fileName = __FILE__,
       $line = __LINE__,
-      Throwable $previous
+      Throwable $previous = null
     ) {
         parent::__construct(
             json_last_error_msg(),
diff --git a/src/Sikofitt/Config/Loader/JsonFileLoader.php b/src/Sikofitt/Config/Loader/JsonFileLoader.php
index cad4c10..f15847e 100644
--- a/src/Sikofitt/Config/Loader/JsonFileLoader.php
+++ b/src/Sikofitt/Config/Loader/JsonFileLoader.php
@@ -19,11 +19,14 @@
 
 namespace Sikofitt\Config\Loader;
 
+use Sikofitt\Config\Loader\Exception\JsonDecodingException;
 use Symfony\Component\Config\Loader\FileLoader;
 use Webmozart\Json\JsonDecoder;
 
 class JsonFileLoader extends FileLoader
 {
+    private $useWebMozartEncoder = true;
+
     /**
      * Loads a resource.
      *
@@ -36,15 +39,27 @@ class JsonFileLoader extends FileLoader
      */
     public function load($resource, $type = null)
     {
-        if (class_exists('Webmozart\Json\JsonDecoder')) {
-            $decoder = new JsonDecoder();
-
-            return (array)$decoder->decodeFile($resource);
+        if (false === getenv('JSON_TEST')) {
+            if ($this->useWebMozartEncoder && class_exists('Webmozart\Json\JsonDecoder')) {
+                $decoder = new JsonDecoder();
+                $decoder->setObjectDecoding(JsonDecoder::ASSOC_ARRAY);
+                return $decoder->decodeFile($resource);
+            }
         }
 
-        return \json_decode(file_get_contents($resource), true);
+        if (null === $json = \json_decode(file_get_contents($resource), true)) {
+            throw new JsonDecodingException();
+        }
+
+        return $json;
     }
 
+    public function setUseWebMozartDecoder($enable = true)
+    {
+        $this->useWebMozartEncoder = $enable;
+
+        return $this;
+    }
     /**
      * Returns whether this class supports the given resource.
      *
diff --git a/tests/Sikofitt/Tests/Config/JsonFileTest.php b/tests/Sikofitt/Tests/Config/JsonFileTest.php
new file mode 100644
index 0000000..c089df9
--- /dev/null
+++ b/tests/Sikofitt/Tests/Config/JsonFileTest.php
@@ -0,0 +1,71 @@
+<?php declare(strict_types=1);
+
+/*
+ *     Copyleft (C) 2017  http://sikofitt.com sikofitt@gmail.com
+ *
+ *     This program is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     This program is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Sikofitt\Tests\Config;
+
+use PHPUnit\Framework\TestCase;
+use Sikofitt\Config\DotConfig;
+use Sikofitt\Config\Loader\Exception\JsonDecodingException;
+
+class JsonFileTest extends TestCase
+{
+    /**
+     * @var DotConfig
+     */
+    private $config;
+
+    /**
+     * @var \Composer\Autoload\ClassLoader;
+     */
+    private $loader;
+
+    public function setUp(): void
+    {
+        $this->loader = require __DIR__.'/../../../../vendor/autoload.php';
+
+        $this->config = new DotConfig(__DIR__.'/../../../fixtures/config.json');
+
+        parent::setUp();
+    }
+
+    public function testSuccess(): void
+    {
+        $arrayConfig['config'] = [
+          'value' => 'json',
+          'json_test' => [
+            'testing1',
+            'testing2',
+          ],
+        ];
+
+        $this->assertSame($arrayConfig, $this->config->all());
+        $this->assertInternalType('array', $this->config->all());
+    }
+
+    public function testFailure(): void
+    {
+        if (false === getenv('JSON_TEST') && class_exists(\Webmozart\Json\JsonDecoder::class)) {
+            $this->expectException(\Webmozart\Json\DecodingFailedException::class);
+        } else {
+            $this->expectException(JsonDecodingException::class);
+        }
+
+        $config = new DotConfig(__DIR__.'/../../../fixtures/failure/config.json');
+    }
+}
diff --git a/tests/Sikofitt/Tests/Config/NeonFileTest.php b/tests/Sikofitt/Tests/Config/NeonFileTest.php
new file mode 100644
index 0000000..048e0bd
--- /dev/null
+++ b/tests/Sikofitt/Tests/Config/NeonFileTest.php
@@ -0,0 +1,60 @@
+<?php declare(strict_types=1);
+
+/*
+ *     Copyleft (C) 2017  http://sikofitt.com sikofitt@gmail.com
+ *
+ *     This program is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     This program is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Sikofitt\Tests\Config;
+
+use PHPUnit\Framework\TestCase;
+use Sikofitt\Config\DotConfig;
+
+class NeonFileTest extends TestCase
+{
+    /**
+     * @var DotConfig
+     */
+    private $config;
+
+    public function setUp(): void
+    {
+        $this->config = new DotConfig(__DIR__.'/../../../fixtures/config.neon');
+        $this->setUseErrorHandler(true);
+
+        parent::setUp();
+    }
+
+    public function testNeonConfig(): void
+    {
+        $arrayConfig['config'] = [
+          'value' => 'neon',
+          'neon_test' => [
+            'testing1',
+            'testing2',
+          ],
+        ];
+
+        $this->assertSame($arrayConfig, $this->config->all());
+        $this->assertInternalType('array', $this->config->all());
+    }
+
+    public function testFailure(): void
+    {
+        $this->expectException('Nette\Neon\Exception');
+
+        $config = new DotConfig(__DIR__.'/../../../fixtures/failure/config.neon');
+    }
+}
diff --git a/tests/Sikofitt/Tests/Config/PhpFileTest.php b/tests/Sikofitt/Tests/Config/PhpFileTest.php
new file mode 100644
index 0000000..656466a
--- /dev/null
+++ b/tests/Sikofitt/Tests/Config/PhpFileTest.php
@@ -0,0 +1,59 @@
+<?php declare(strict_types=1);
+
+/*
+ *     Copyleft (C) 2017  http://sikofitt.com sikofitt@gmail.com
+ *
+ *     This program is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     This program is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Sikofitt\Tests\Config;
+
+use PHPUnit\Framework\TestCase;
+use Sikofitt\Config\DotConfig;
+
+class PhpFileTest extends TestCase
+{
+    /**
+     * @var DotConfig
+     */
+    private $config;
+
+    public function setUp(): void
+    {
+        $this->config = new DotConfig(__DIR__.'/../../../fixtures/config.php');
+
+        parent::setUp();
+    }
+
+    public function testPhpConfig(): void
+    {
+        $arrayConfig['config'] = [
+          'value' => 'php',
+          'php_test' => [
+            'testing1',
+            'testing2',
+          ],
+        ];
+
+        $this->assertSame($arrayConfig, $this->config->all());
+        $this->assertInternalType('array', $this->config->all());
+    }
+
+    public function testFailure(): void
+    {
+        $this->expectException(\TypeError::class);
+
+        $config = new DotConfig(__DIR__.'/../../../fixtures/failure/config.php');
+    }
+}
diff --git a/tests/fixtures/config.yml b/tests/fixtures/config.yml
new file mode 100644
index 0000000..bd405df
--- /dev/null
+++ b/tests/fixtures/config.yml
@@ -0,0 +1,5 @@
+config:
+    value: 'yaml'
+    yaml_test:
+        - testing
+        - testing1
\ No newline at end of file
diff --git a/tests/fixtures/failure/config.ini b/tests/fixtures/failure/config.ini
new file mode 100644
index 0000000..7cf66f5
--- /dev/null
+++ b/tests/fixtures/failure/config.ini
@@ -0,0 +1,4 @@
+[config]
+value = ini
+ini_test[] = testing1
+ini_test[] = testing2
\ No newline at end of file
diff --git a/tests/fixtures/failure/config.json b/tests/fixtures/failure/config.json
new file mode 100644
index 0000000..3ebcb07
--- /dev/null
+++ b/tests/fixtures/failure/config.json
@@ -0,0 +1,9 @@
+
+  "config": {
+    "value": "json",
+    "json_test": [
+      "testing1",
+      "testing2"
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/fixtures/failure/config.neon b/tests/fixtures/failure/config.neon
new file mode 100644
index 0000000..a71b0ca
--- /dev/null
+++ b/tests/fixtures/failure/config.neon
@@ -0,0 +1,5 @@
+		config:
+	value: neon
+	neon_test:
+		- testing1
+		- testing2
diff --git a/tests/fixtures/failure/config.php b/tests/fixtures/failure/config.php
new file mode 100644
index 0000000..e446cdd
--- /dev/null
+++ b/tests/fixtures/failure/config.php
@@ -0,0 +1,28 @@
+<?php declare(strict_types=1);
+
+/*
+ *     Copyleft (C) 2017  http://sikofitt.com sikofitt@gmail.com
+ *
+ *     This program is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     This program is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+$arrayValue = [
+  'config' => [
+    'value' => 'php',
+    'php_test' => [
+      'testing1',
+      'testing2',
+    ],
+  ],
+];
diff --git a/tests/fixtures/failure/config.yaml b/tests/fixtures/failure/config.yaml
new file mode 100644
index 0000000..1dac0c1
--- /dev/null
+++ b/tests/fixtures/failure/config.yaml
@@ -0,0 +1,5 @@
+        config:
+    value: 'yaml'
+    yaml_test:
+        - testing
+        - testing1
\ No newline at end of file