Flush stdout after writing the prompt, makes sure it also works on anything non-console (like redirected output)