protected function decodeFile(\SplFileInfo $file, $strict = true)
    {
        $mimeType = $file->getExtension();

        $this->checkAndAddDefaultDecoder($mimeType);

        if ($this->isSupportedMimeType($mimeType)) {

            if (is_readable($file->getPathname())) {
                $data = $this->getFileContents($file);
            } else {
                if ($strict) {
                    throw new \Exception("File not found: {$file->getPathname()}");
                } else {
                    return [];
                }
            }

            return $this->decoders[$mimeType]->decode($data);
        }

        $this->unsupportedFiles[] = $file->getFilename();
        return false;
    }