This call is not required before close() and it will prevent closing of writer if write fails for some reason.