Flush stdout after putchar('.') to ensure that the characters are printed immediately as a progress indicator.