Improve showprogress implementation.