Added a specific check to not try and flush STDIN