added a print statement for total bytes at the end