Replace io.stdin:read("*line") with a custom read_line function.