method to write lmrtt to file