Callback is not handled properly when buffer is not supplied. Code in example fails with typeerror due to this conflict.