protected function _checkDir($directory)
    {
        $eDir = @dir($directory);
        if (false == $eDir) {
            // Dir does probably not exist
            if (!is_dir($directory)) {
                if (false === @mkdir($directory, 0777, true)) {
                    \MUtil_Echo::pre(sprintf($this->translate->_('Directory %s not found and unable to create'), $directory), 'OpenRosa ERROR');
                } else {
                    $eDir = @dir($directory);
                }
            }
        }

        return $eDir;
    }