added better error handling of git status command