Make saveProfile more flexible for IDE