fixed error message in iostream

fixed #1229