refactor all structure and finally fix watch files bug