Support glob.
Fix bugs in watch.