Putting bool checks if the stdout stream has been written