internal some domain 1 record 1 record 2 some domain 2 record 1 record 2 external some domain 1 record 1 record 2 some domain 2 record 1 record 2 then i need that files would be created in: if from external would write into external directory then should check domain entry and create file by this name and then write records in that file and same for internal