add file watching and fix userdir access