cast max length from cmd line to integer
add progress percentage. change cmd options