Change API return type to use io exception.