Wrong use of fflush() library function