protected function loadFile($filename)
    {
        if (!is_string($filename)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, gettype($filename)));
        }

        try {
            $content = file_get_contents($filename);
        } catch (\Exception $exception) {
            throw new RuntimeException(sprintf('Could not load file %s', $filename));
        }

        if ($content === false) {
            throw new RuntimeException(sprintf('Could not load file %s', $filename));
        }

        return $content;
    }