Enhance consistency by using BIO_flush() instead of fflush().