I think the point of using fprintf here is the line is replaced each time, instead of printing new lines (and then there is a final call with qDebug in finalize).