Proper assembling of txt file