Code appears to work now
Fixed backup process