Generate .txt file