flush output before prompting for input