fix IO exception throws