Switched to using uchars. fputs() => fwrite().