Indeed the flush of stderr is redundant, but other than that the code is true to form.