updated error handling for read_lines_fgets function