bugfix #2127 - fprintf statement conditionalized appropriately