Use xreadlines insead of readlines