Run portupgrade in batch mode. Swap order of steps 3 and 4