Improved code. Added enum with supported OSs. Improved error message.
(actually testing hitgub :-)