Can't we do line based reads here instead of reading whole file into memory?