public static function renderFile($filename, $vars = array())
    {
        self::fireEvent('Atomik::Renderfile::Before', array(&$filename, &$vars));
        
        if (($callback = self::get('app.views.engine', false)) !== false) {
            if (!is_callable($callback)) {
                throw new AtomikException('The specified rendering engine callback cannot be called');
            }
            $output = $callback($filename, $vars);
            
        } else {
            list($output, $vars) = self::instance()->scoped($filename, $vars, self::get('app.views.short_tags', true));
        }
        
        self::fireEvent('Atomik::Renderfile::After', array($filename, &$output, $vars));
        return $output;
    }