added method to write path results out to file.