Fixed create list command so it doesnt depend on the length of the file