Reset method for BufferedWriter