putchar_file updated with counts