watches files and takes action when they change