Fixed some bugs in git update and added command line args