ensure that proc is closed before we return true