Adds buffer writing