move the check for local package up