[table] also check fclose return value