Added in mode functionality, to detect local or server