Rebuild .txt file