added file watching support to enable resource reloading