generate file for records if not exists