bettered loadNpmPackages check