Added exit dialog & OS detection