Use throwIO rather than throw