When `std::cout` and `FILE *stdout` are used at same time need to explicitly flush otherwise they can be out of sync.