fix each_line to actually read whole lines