added path.resolve to ensure always comparing absolutes paths