add glob dep & do some err handle