Fixed progress bar for linux by including std::flush for cout stream