Make sure to delete lastgood before writing new one.