Refactored code -> removed a method from the BufferedFileWriter