Buffer: fixed .writeArrayAsync()

Empty array was not written properly.
Updated logErrorsToConsole to work as expected