File writing now buffered