putc() failed before, but fwrite() works! Just need to get size right...