Console: Handle stdout before writing the prompt