buffering to disk