Add log & function for option -x & some function for regex