protected static function oldModule($className, $nameSpace, & $file = null)
    {
        //elapsed('++ Autoloading '.$value.' from '.$nameSpace);

        // Convert to linux path, windows will convert it automatically if necessary
        $ns = str_replace(self::NS_SEPARATOR, '/', $nameSpace);

        // Check if we have predefined namespace path definition
        if (isset(self::$moduleMap[$nameSpace])) {
            // take path from module location map
            $path = self::$moduleMap[$nameSpace];
        } else { // Try automatic searcher

            /** @var string[] $locations Collection of possible class locations */
            $locations = null;
            // Iterate all possible file structures
            $path = null;
            foreach (array('php', 'js', 'cms', 'social', 'commerce') as $type) {

                // Build all possible module location for backward compatibility
                $locations = array(
                    __SAMSON_VENDOR_PATH . str_replace('samson/', 'samsonos/', $ns) . '/' . strtolower($className),
                    __SAMSON_VENDOR_PATH . str_replace('samson/', 'samsonos/', $ns),
                    __SAMSON_VENDOR_PATH . str_replace('samson/', 'samsonos/' . $type . '/', $ns),
                    __SAMSON_VENDOR_PATH . str_replace('samson/', 'samsonos/' . $type . '/', $ns) . '/api',
                    __SAMSON_VENDOR_PATH . str_replace('samson/', 'samsonos/' . $type . '_', $ns),
                    strpos($ns, 'cms') !== false ? __SAMSON_VENDOR_PATH . 'samsonos/cms_api' : '_', // use cms api if class name has "cms"
                    strpos($ns, 'cms') !== false ? __SAMSON_VENDOR_PATH . 'samsonos/cms/api' : '_', // use cms api if class name has "cms"
                    __SAMSON_CWD__ . __SAMSON_MODEL_PATH, // use local model path as the last variant of class location
                );

                // Iterate all locations and try to find correct existing path
                foreach ($locations as $location) {
                    if (file_exists($location)) {
                        $path = $location;
                        break 2;
                    }
                }
            }
        }

        // If class not found
        if (isset($path)) {
            $path .= '/';

            // Build files tree once for each namespace
            if (!isset(self::$fileCache[$nameSpace])) {
                self::$fileCache[$nameSpace] = File::dir($path, 'php');
            }

            // Trying to find class by class name in folder files collection
            if (sizeof($files = preg_grep('/\/' . $className . '\.php/i', self::$fileCache[$nameSpace]))) {
                // If we have found several files matching this class
                if (sizeof($files) > 1) {
                    return e('Cannot autoload class(##), too many files matched ##', E_SAMSON_CORE_ERROR, array($className, $files));
                }

                // Return last array element as file path
                $file = end($files);

                //elapsed('  Loaded class['.$key.'] from "'.$file.'"');

                // Everything is OK
                return true;
            }
        }

        // If we are here - signal error
        //return e('Cannot autoload class(##), class file not found in ##', D_SAMSON_DEBUG, array($value,$path));
        return false;
    }