Added logic to the erlang cookie deployment before issuing a cluster reset