protected function grabFile($file, $root)
    {
        $data = '';
        if (is_file($root . '/' . $file)) {

            $this->loaded_files[] = $file;

            $file = $root . '/' . $file;

            $data = file_get_contents($file);
            if (!strstr($file, 'sb.js')) {
                preg_match_all("~sb\.include\([\"'](.*?)[\"']~", $data, $includes);

                if ($includes[1]) {
                    $precludes = '';
                    foreach ($includes[1] as $include) {
                        $include = \str_replace('.', '/', $include) . '.js';
                        if (!\in_array($include, $this->loaded_files)) {
                            $precludes .= $this->grabFile($include, $root);
                        }
                    }

                    $data = $precludes . "\n" . $data;
                }
            }
        } else {

            echo"\nthrow('ERROR: " . $file . " Surebert module \""
            . \basename($file) . "\" could not be located by /surebert/load ');";
        }

        return $data;
    }