ditched non-formatted printf/fprintf calls in favor of puts/fputs