fix minibatch number print to file bug