Merge pull request #231 from berkerpeksag/simplfy-oserror