Changed the safe fprintf() procedure to follow the parameter order of fputs().