Flushing output after do_command function in main