splitting up long string before saving to disk