close the data streams if we hit the exception