Moved apt-get upgrade to near the top