Throw IOException, more appropriate than RuntimeException.