Adding and using a common code path to close/dispose. Remove the 'no-op' error check