split file logically