updates to script to check OS type for download