Add method to save output as files