refactor file caching; working watch command