Updated from path.resolve to __dirname.