Fix a call to iprintf(), also fix sequencing of some output flushes.

Related to Issue #119.