changing from 'each' to 'each_line' to make ruby 1.9 happy