finish OS detection