Reduce needless running external command