Switched to fgets instead of using fgetc