Added method to save responses to file