Added mechanism to detect a previous installation