public function initCliAction()
    {
        clearstatcache();

        $app = 'app/' . Config::get('app.name') . '/';

        $assets = array(
            BASE_PATH . $app . '_session/',
            BASE_PATH . $app . '_cache/',
            BASE_PATH . $app . '_database/',
            BASE_PATH . $app . '_templates/',
        );

        echo 'Check app assets' . PHP_EOL;

        foreach ($assets as $asset) {

            if (!is_dir($asset)) {
                echo "[ Please create '$asset' directory! ]" . PHP_EOL;
            }

            if (!is_writable($asset)) {
                echo "[ Please make '$asset' writable! ]" . PHP_EOL;
            }
        }

        echo 'Secure root directory' . PHP_EOL;
        chmod(BASE_PATH, 0755);

        echo 'Secure .htaccess' . PHP_EOL;
        chmod(BASE_PATH . '.htaccess', 0644);

        echo 'Secure index.php' . PHP_EOL;
        chmod(BASE_PATH . 'index.php', 0644);

        echo 'Secure autoload.core.php' . PHP_EOL;
        chmod(BASE_PATH . 'pimf-framework/autoload.core.php', 0644);

        echo 'Create logging files' . PHP_EOL;

        $directory = Config::get('bootstrap.local_temp_directory');

        $handle = fopen($file = $directory . 'pimf-logs.txt', "at+");
        fclose($handle);
        chmod($file, 0777);
        $handle = fopen($file = $directory . 'pimf-warnings.txt', "at+");
        fclose($handle);
        chmod($file, 0777);
        $handle = fopen($file = $directory . 'pimf-errors.txt', "at+");
        fclose($handle);
        chmod($file, 0777);

        clearstatcache();
    }