adding checks to icon generation