Hai scritto anche fwite invece di fwrite