Replace frets with stream_get_line function.

Signed-off-by: Niel Vanterpool <nielingroup@gmail.com>