add debug option. setup logging for Git if debug true