fix bug in fprintf - cuda-sim.cc