Cleanup use of fprintf(), exit().