Slight change to program:
Added output of number of times write/fwrite called!