Added patch to prevent crash

Sometimes Google Api Client got disconnected, so that it caused
crashes.
Now, it would check the Google Api Client is connected, if it’s not
connected, then connect first and execute the command.