Added persistence file
Added switch persistence