Thanks for the tip. However the statements that set null reference to the reader and writer are redundant.