adding --len as new option on dump, and adding tests