check file size and fix end_id in names