Add function to convert PhoenixText to a file