Should ``sd`` be closed here?