Switch to MonadThrow from exceptions