refactored activateProfile to pass a path instead of a profile name