use 'when' instead of if not and update comment about environment specific configuration