Added settings check
Added better support for OS detection