method for writing deviedetails records to file