Handle read error on stdin stream