convert printf to cpp-streams for 32bit compiler compatibility