Added automated OS detection