add buffer for file stream