Dump_modify every && next() don't work correctly

Hello everyone:
I want to dump system at custom timestep,so I use fix “dump_modify every” command and get timestep from a file.

However, if I use the following in.file, it doesn’t dump at one special step:

Hello everyone:
I want to dump system at custom timestep,so I use fix "dump_modify every"
command and get timestep from a file.

However, if I use the following in.file, it doesn't dump at one special
step:
##############
........
variable TimeStepFile file ./dumpTimeStep.dat
variable TimeStep equal next(TimeStepFile)
dump dump4post all custom 100 ./dump/dump_*.dat id mol x y z vx vy vz ix iy
iz
dump_modify dump4post sort id every v_TimeStep
........
fix 1 all nvt temp 1.5 1.5 100
run 40000
unfix 1

uncompute myRdf
unfix ave_rdf
undump dump4rdf

fix 1 all nvt temp 1.5 1.5 100
run 2200000
unfix 1
####################
The timestep file is:
....
39989
39996
40005
40006
40007
....

It doesn't dump at "40005",other timestep is OK!
It may cause by "next()" command!

How to solve this problem?

this is due to having two run statements, which interferes with the
next statement always pulling a new entry from the list. so the
current value of the TimeStep value is lost after the end of the first
run. so you either have to setup two files and do a new variable
definition and dump_modify command after the first run. or add a dummy
entry in the file.

axel.