Refactors if statement in config generator

Appends two if statements since the two conditions are orthogonal

Change-Id: Icff02179fb83017dea02f2a9cd29ec1c1973f805