wrap IOExceptions; inline simple methods