added os.chdir to ipclient