Write answers to file