add __dirname global; rename updated event