fixed 2 out of three fprintfs