fixed write_text_file for octave