added checks for non existing profiles