Switching between server and local