Added an option to disable writing restarts.