Actually, if there's an exception the url file object will never be opened. So success is only case where you actually would need to close the file.