Get rid of synchronized BufferedInputStream in FileDataWriter, backport #1143