public function getApplication()
    {
        if (!($this->_io instanceof IOInterface)) {
            throw new \RuntimeException('Bootstrapper instance requires IOInterface instance. Please call setIO() first.');
        }

        if (!$this->_bootstrapped) {
            $this->_bootstrap();
        }

        if (!($this->_application instanceof Application))
        {
            $options = array(
                'root_user' => $this->_credentials['username'],
                'loglevel'  => $this->_verbosity,
                'platform'  => Util::isJoomlatoolsPlatform()
            );

            try
            {
                $this->_application = new Application($options);
                $this->_application->authenticate($this->_credentials);
            }
            catch (\Exception $ex)
            {
                $this->_io->write("<error>Failed to initialize the Joomla application</error>");

                if ($this->_io->isVerbose()) {
                    $this->_io->write($ex->getMessage());
                }

                if ($this->_io->isDebug()) {
                    throw $ex;
                }

                $this->_application = false;
            }
        }

        return $this->_application;
    }