Updated: read line-by-line