use while and readline to read file
for