read_line: Simplify loop and return 1 on missing file