fix errors w/ windows raising weird exceptions
fix OSError types in except blocks