Use each_line to parse payload