Move last output length into hash, also, mutate the hash so the stats can be reads afterwards