I am a bit unclear as to what the problem is, apart from you getting different values from expected. Is the key value being reset to 38 on each run, or is it counting up appropriately but is now a low value? If you manually check your key file from a UNIX shell, what is the value there? How did you ...