check error on getline() return.