only should need to call file_len once