added datafile watching functionality