Made corrections to example usage of writeIntoBuffer