reindent and flush JS output, to make sure the progressbar updates