Fix an unchecked warning in BaseWriter.java