shutoff-safe writing added