changed path.resolve to path.join