Save tasks to file