Call replaying failed in multiple RDB in KDB+ ?

https://learninghub.kx.com/forums/topic/call-replaying-failed-in-multiple-rdb-in-kdb

I have rdb file like below this, but it didn't work for replaying when I run

list_tables: (`derivatives_positions);

if[not "w"=first string .z.o;system "sleep 1"];

upd:{if[x in list_tables;x insert y]};

.u.x:.z.x,(count .z.x)_(":5010";":5032");

.u.end:{t:tables`.;

{0!x}each t;
t@:where `g=attr each t@\:`sym;
.Q.hdpf[`$":",.u.x 1;hsym `$"/home/bitwyredev/tickerplant/risk-engine/derivatives/hdb";x;`sym];
@[;`sym;`g#] each t;
`derivatives_positions set select by sym, instrument from derivatives_positions;
`derivatives_positions insert (`$"init";`$"0";00:00:00.000000000;"init";0h;0h;0h;"000";"000";"000";"000";`$"0";0h;"000";"000";"000";"000";"000";"000";"000";"000";"000";"000";"000";"000";"000";"000";"000";0);
.Q.gc[];};

.u.rep:{(.[;();:;].)each x;
if[null first y;:()];
-11!y;
`derivatives_positions set select by sym, instrument from derivatives_positions;
.Q.gc[];
`upd set (upsert);
system "cd /home/bitwyredev/tickerplant/risk-engine/derivatives/hdb"};

.u.rep .(hopen `$":",.u.x 0)".u.sub[;`]each(),`derivatives_positions";



my suspect is
.u.rep .(hopen `$":",.u.x 0)".u.sub[;`]each(),`derivatives_positions";

this code failed to called function .u.rep, when i select derivatives_positions, it doesnt create keyed table

how to fix this code