Be carefull when handling bad quality lines, and work in interative way.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>