IO.readline deprecated, updated code example