check_parse: Further fix error handling of fgets