Add reset while outputing byte[] object