public function readFile($filename)
    {
        if (is_file($filename) === false) {
            throw new FileNotFoundException(sprintf('File "%s" does not exist.', $filename));
        }
        if (is_readable($filename) === false) {
            throw new IOException(sprintf('File "%s" cannot be read.', $filename));
        }

        $content = file_get_contents($filename);

        if ($content === false) {
            throw new IOException(sprintf('Error reading the content of the file "%s".', $filename));
        }

        return $content;
    }