change Gem checking, change error printing